mirror of
https://github.com/RangeNetworks/openbts.git
synced 2025-11-03 05:13:16 +00:00
sync of openbts
git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@6168 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
45
TransceiverRAD1/FactoryCalibration.h
Normal file
45
TransceiverRAD1/FactoryCalibration.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2013 Range Networks, Inc.
|
||||
*
|
||||
* This software is distributed under multiple licenses;
|
||||
* see the COPYING file in the main directory for licensing
|
||||
* information for this specific distribuion.
|
||||
*
|
||||
* This use of this software may be subject to additional restrictions.
|
||||
* See the LEGAL file in the main directory for details.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
*/
|
||||
|
||||
#include "rnrad1Core.h"
|
||||
|
||||
/*
|
||||
TODO : lots of copied bits from RAD1CMD and RAD1SN, could definitely be improved
|
||||
by simplifying the hex<->dec parsing. Comments from rad1_setup.sh inline.
|
||||
*/
|
||||
class FactoryCalibration {
|
||||
|
||||
private:
|
||||
|
||||
rnrad1Core * core;
|
||||
unsigned int sdrsn;
|
||||
unsigned int rfsn;
|
||||
unsigned int band;
|
||||
unsigned int freq;
|
||||
unsigned int rxgain;
|
||||
unsigned int txgain;
|
||||
|
||||
static int hexval (char ch);
|
||||
static unsigned char * hex_string_to_binary(const char *string, int *lenptr);
|
||||
bool i2c_write(int i2c_addr, char *hex_string);
|
||||
std::string i2c_read(int i2c_addr, int len);
|
||||
unsigned int hex2dec(std::string hex);
|
||||
|
||||
public:
|
||||
|
||||
unsigned int getValue(std::string name);
|
||||
void readEEPROM();
|
||||
};
|
||||
Reference in New Issue
Block a user