move to tab indentaion

This commit is contained in:
2022-01-31 21:13:27 +01:00
parent 8f5431fbc3
commit 074c832b3a
9 changed files with 311 additions and 311 deletions

View File

@ -1,40 +1,40 @@
void EEPROM_write_char(uint16_t address, unsigned char data)
{
/* Wait for completion of previous write */
while(EECR & (1<<EEPE));
/* Set up address and Data Registers */
EEAR = address;
EEDR = data;
/* Write logical one to EEMPE */
EECR |= (1<<EEMPE);
/* Start eeprom write by setting EEPE */
EECR |= (1<<EEPE);
/* Wait for completion of previous write */
while(EECR & (1<<EEPE));
/* Set up address and Data Registers */
EEAR = address;
EEDR = data;
/* Write logical one to EEMPE */
EECR |= (1<<EEMPE);
/* Start eeprom write by setting EEPE */
EECR |= (1<<EEPE);
}
unsigned char EEPROM_read_char(uint16_t uiAddress)
{
/* Wait for completion of previous write */
while(EECR & (1<<EEPE));
/* Set up address register */
EEAR = uiAddress;
/* Start eeprom read by writing EERE */
EECR |= (1<<EERE);
/* Return data from Data Register */
return EEDR;
/* Wait for completion of previous write */
while(EECR & (1<<EEPE));
/* Set up address register */
EEAR = uiAddress;
/* Start eeprom read by writing EERE */
EECR |= (1<<EERE);
/* Return data from Data Register */
return EEDR;
}
void EEPROM_write_string(uint16_t address, char* buffer, uint16_t length)
{
for(uint16_t i = 0; i < length; i++)
{
EEPROM_write_char( address+i, buffer[i] );
}
for(uint16_t i = 0; i < length; i++)
{
EEPROM_write_char( address+i, buffer[i] );
}
}
void EEPROM_read_string(uint16_t address, char* buffer, uint16_t length)
{
for(uint16_t i = 0; i < length; i++)
{
buffer[i] = EEPROM_read_char( address+i);
}
for(uint16_t i = 0; i < length; i++)
{
buffer[i] = EEPROM_read_char( address+i);
}
}