Started following some tutorial on att85 usi. Downloaded example code from make avr book.

This commit is contained in:
Dan
2022-09-20 01:08:01 -04:00
parent d0cbc0000e
commit 361a828c46
295 changed files with 68746 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#include <avr/io.h>
#include <avr/eeprom.h>
int main(void) {
// Store the 8-bit value 5 in EEPROM slot 0
uint8_t *address = (uint8_t *) 0;
eeprom_update_byte(address, 5);
// Store the 16-bit value 12345 in EEPROM slots 5 and 6:
eeprom_update_word((uint16_t *) 5, 12345);
// Store a character array (string) in EEPROM slots 16-28:
char *stringPointer = (char *) 16;
char myString[] = "hello world.";
eeprom_update_block(myString, stringPointer, sizeof(myString));
return 0;
}