本文整理汇总了C++中STORAGE::read方法的典型用法代码示例。如果您正苦于以下问题:C++ STORAGE::read方法的具体用法?C++ STORAGE::read怎么用?C++ STORAGE::read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类STORAGE
的用法示例。
在下文中一共展示了STORAGE::read方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
/**
* init
*
* Initialize register
*/
void REGISTER::init(void)
{
// Does the value need to be read from EEPROM?
if (eepromAddress >= 0)
{
STORAGE nvMem;
// Read from info memory
nvMem.read(value, eepromBank, eepromAddress, length);
}
}
示例2:
uint8_t Encoder<POT,STORAGE, LOG>::loadSettings(STORAGE& storage, int addr) {
uint8_t rvalue = true;
// load settings from EEPROM
if( 179 == storage.read(addr) ) {
// Okay, we've written here before, w00t!
addr++;
JTIncrementalEncoder::loadSettings(storage, this->state.channels.a, addr);
JTIncrementalEncoder::loadSettings(storage, this->state.channels.b, addr);
} else {
rvalue = false;
}
return rvalue;
}
示例3: init
/**
* init
*
* Initialize SWAP registers and stack
*/
void SWAP::init(void)
{
uint8_t i;
STORAGE nvMem;
// Read signature from info/eeprom memory
uint8_t signature[2];
nvMem.read(signature, DEFAULT_NVOLAT_SECTION, NVOLAT_SIGNATURE, sizeof(signature));
// Correct signature in non-volatile memory?
if ((signature[0] != NVOLAT_SIGNATURE_HIGH) || (signature[1] != NVOLAT_SIGNATURE_LOW))
nvolatToFactoryDefaults(); // Copy default settings in non-volatile memory
// Intialize registers
for(i=0 ; i<regTableSize ; i++)
regTable[i]->init();
// Config radio settings
panstamp.radio.devAddress = devAddress & 0xFF;
panstamp.radio.setCCregs();
// Attach RF ISR
panstamp.attachInterrupt(pacKetReceived);
}
示例4: word
static inline int eepromReadInt(STORAGE& storage, int addr) {
uint8_t low = storage.read(addr++);
uint8_t high = storage.read(addr);
return word(high, low);
}