From 36be2115ad7cac6e8b9d314308c0fac5e8936102 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 30 Jan 2013 01:51:57 +0000 Subject: some more cleanup git-svn-id: https://svn.spreadspace.org/avr/trunk@100 aa12f405-d877-488e-9caf-2d797e2a1cc7 --- usb-i2c-sl018/tuer-rfid.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'usb-i2c-sl018') diff --git a/usb-i2c-sl018/tuer-rfid.c b/usb-i2c-sl018/tuer-rfid.c index 69d23cc..d225a0e 100644 --- a/usb-i2c-sl018/tuer-rfid.c +++ b/usb-i2c-sl018/tuer-rfid.c @@ -40,7 +40,7 @@ #define EEPROM_SIZE 1024 typedef uint8_t keyslot_t[8]; -keyslot_t EEMEM keyslots[EEPROM_SIZE/sizeof(keyslot_t)]; +keyslot_t EEMEM keystore[EEPROM_SIZE/sizeof(keyslot_t)]; #define TAG_STA_PIN PINB #define TAG_STA_BIT 7 @@ -207,7 +207,7 @@ bool sl018_cmd_raw(const uint8_t* send_twi_buf, bool wait_for_answer) return 0; } -bool sl018_reset() +bool sl018_reset(void) { if(sl018_cmd_raw(SL018CMD_ComReset, 0)) { fprintf(stdio, "I2C error\n\r"); @@ -240,7 +240,7 @@ bool sl018_cmd(const uint8_t* send_twi_buf) -void flash_eeprom_from_stdio(void) +void flash_keystore_from_stdio(void) { keyslot_t keyslot; uint8_t keyslot_pos=0; @@ -257,7 +257,7 @@ void flash_eeprom_from_stdio(void) bytes_received--; if (byte_pos == sizeof(keyslot)) { byte_pos=0; - eeprom_update_block(&keyslot,&keyslots[keyslot_pos],sizeof(keyslot)); + eeprom_update_block(&keyslot,&keystore[keyslot_pos],sizeof(keyslot)); keyslot_pos++; fprintf(stdio,"."); fflush(stdio); @@ -269,13 +269,13 @@ void flash_eeprom_from_stdio(void) led_off(); } -void dump_eeprom_to_stdio(void) +void dump_keystore_to_stdio(void) { keyslot_t keyslot; uint8_t keyslot_pos=0; for(keyslot_pos=0;keyslot_pos sizeof(keyslot_t) ? sizeof(keyslot_t) : uid_len; for (uint8_t pos=0; pos