Beispiel #1
0
void EEPROMClass::write(unsigned short int in_addr, unsigned char in_data)
{
  if(((in_addr >= EEPROMSIZE) && (_bank == EEPROM_16K)) || ((in_addr >= EEPROMSIZE_BANK0) && (_bank == EEPROM_200B)))//bank == true 0~16384, false 0~199
  {
    Serial.print("EEPROMClass write error(bank = ");
	Serial.print(_bank);
	Serial.print("): in_addr = ");
	Serial.print(in_addr);
	Serial.print(" >= ");
	Serial.println(EEPROMSIZE);
	return;
  }
  if(_bank == EEPROM_200B)
    write_cmos(in_addr, in_data);
  else
    (_data[in_addr / DATASIZE])->write(in_addr - (DATASIZE * (in_addr / DATASIZE)) , in_data);
}
Beispiel #2
0
DMPAPI(void) 	eeprom_write_byte (uint8_t *__p, uint8_t __value) {
	write_cmos((uint8_t) __p, __value);
}