summaryrefslogtreecommitdiffstats
path: root/firmware/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/main.c')
-rw-r--r--firmware/main.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/firmware/main.c b/firmware/main.c
index 63979ac..4d51c10 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -39,19 +39,23 @@
#endif
// Device configuration reply
-// Length: 4 bytes
+// Length: 6 bytes
// Byte 0: User program memory size, high byte
// Byte 1: User program memory size, low byte
// Byte 2: Flash Pagesize in bytes
// Byte 3: Page write timing in ms.
// Bit 7 '0': Page erase time equals page write time
// Bit 7 '1': Page erase time equals page write time divided by 4
+// Byte 4: SIGNATURE_1
+// Byte 5: SIGNATURE_2
-PROGMEM const uint8_t configurationReply[4] = {
+PROGMEM const uint8_t configurationReply[6] = {
(((uint16_t)PROGMEM_SIZE) >> 8) & 0xff,
((uint16_t)PROGMEM_SIZE) & 0xff,
SPM_PAGESIZE,
- MICRONUCLEUS_WRITE_SLEEP
+ MICRONUCLEUS_WRITE_SLEEP,
+ SIGNATURE_1,
+ SIGNATURE_2
};
typedef union {
@@ -74,7 +78,7 @@ enum {
cmd_erase_application=2,
cmd_write_data=3,
cmd_exit=4,
- cmd_write_page=64, // internal commands start at 64
+ cmd_write_page=64 // internal commands start at 64
};
register uint8_t command asm("r3"); // bind command to r3