git.droids-corp.org
/
protos
/
xbee-avr.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add code to load/save configuration in eeprom
[protos/xbee-avr.git]
/
main.c
diff --git
a/main.c
b/main.c
index
8e2aa0e
..
20e26b0
100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-52,6
+52,7
@@
#include <rdline.h>
#include <timer.h>
#include <rdline.h>
#include <timer.h>
+#include "eeprom_config.h"
#include "beep.h"
#include "main.h"
#include "beep.h"
#include "main.h"
@@
-247,7
+248,7
@@
int xbee_recv_data(struct xbee_recv_hdr *recvframe, unsigned len)
val += 512;
spi_servo_set(0, val);
break;
val += 512;
spi_servo_set(0, val);
break;
-
}
+ }
case RC_PROTO_TYPE_RANGE: {
struct rc_proto_range *rcr =
(struct rc_proto_range *) recvframe->data;
case RC_PROTO_TYPE_RANGE: {
struct rc_proto_range *rcr =
(struct rc_proto_range *) recvframe->data;
@@
-660,9
+661,9
@@
int main(void)
fprintf(stderr, "cannot register default channel\n");
return -1;
}
fprintf(stderr, "cannot register default channel\n");
return -1;
}
-
sei();
sei();
+ eeprom_load_config();
xbee_mainloop();
return 0;
}
xbee_mainloop();
return 0;
}