summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/eeprom.avr.c
diff options
context:
space:
mode:
authorNicolas Schodet2010-04-07 23:50:36 +0200
committerNicolas Schodet2010-04-07 23:50:36 +0200
commit760a56ba0746070e205184a15f0b05ef7b6304df (patch)
treed75a5bf99dbced32a86e247b285ae235e7fdd151 /digital/io/src/eeprom.avr.c
parentc4556705ce9cb0fc517a3d5ae89b96e8c1db756c (diff)
digital/io: forget sharps
Diffstat (limited to 'digital/io/src/eeprom.avr.c')
-rw-r--r--digital/io/src/eeprom.avr.c23
1 files changed, 1 insertions, 22 deletions
diff --git a/digital/io/src/eeprom.avr.c b/digital/io/src/eeprom.avr.c
index c958910f..a32b9606 100644
--- a/digital/io/src/eeprom.avr.c
+++ b/digital/io/src/eeprom.avr.c
@@ -28,7 +28,6 @@
#include "servo.h" /* SERVO_NUMBER */
#include "servo_pos.h"
-#include "sharp.h" /* sharp_threshold */
#include <avr/eeprom.h> /* eeprom_{read,write}_byte */
@@ -48,7 +47,7 @@
* @warning: you must update this value every time you change the structure of
* data stored into the EEPROM.
*/
-#define EEPROM_PARAM_KEY 0x06
+#define EEPROM_PARAM_KEY 0x07
/** @} */
@@ -58,7 +57,6 @@ eeprom_load_param ()
{
uint8_t compt;
uint8_t pos;
- uint16_t *ptr16;
/* The parameters start at the given address */
uint8_t *ptr8 = (uint8_t *) EEPROM_PARAM_START;
@@ -73,15 +71,6 @@ eeprom_load_param ()
for (pos = 0; pos < SERVO_POS_NUMBER; pos++)
servo_pos_high_time[compt][pos] = eeprom_read_byte(ptr8++);
}
-
- /* Load sharp module data */
- ptr16 = (uint16_t *) ptr8;
- /* Threshold values, high and low */
- for (compt = 0; compt < SHARP_NUMBER; compt++)
- {
- sharp_threshold[compt][0] = eeprom_read_word (ptr16++);
- sharp_threshold[compt][1] = eeprom_read_word (ptr16++);
- }
}
/* Store parameters in the EEPROM. */
@@ -89,7 +78,6 @@ void
eeprom_save_param ()
{
uint8_t compt, pos;
- uint16_t *ptr16;
/* The parameters start at the given address */
uint8_t *ptr8 = (uint8_t *) EEPROM_PARAM_START;
@@ -102,15 +90,6 @@ eeprom_save_param ()
for (pos = 0; pos < SERVO_POS_NUMBER; pos++)
eeprom_write_byte (ptr8++, servo_pos_high_time[compt][pos]);
}
-
- /* Store sharp module data */
- ptr16 = (uint16_t *) ptr8;
- /* Threshold values, high and low */
- for (compt = 0; compt < SHARP_NUMBER; compt++)
- {
- eeprom_write_word (ptr16++, sharp_threshold[compt][0]);
- eeprom_write_word (ptr16++, sharp_threshold[compt][1]);
- }
}
/* Clear parameters in the EEPROM by invalidating the key. */