summaryrefslogtreecommitdiffstats
path: root/firmware/main.c
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2013-12-29 19:48:32 +0100
committercpldcpu <cpldcpu@gmail.com>2013-12-29 19:48:32 +0100
commitb97b7ecb1633750dafc7cc60d834b510961d6cb1 (patch)
tree9bd1c9a74335697451ea9f8565bfb585ef609035 /firmware/main.c
parentaf4391ccca909aa788424d50c1cb3469c3f146ed (diff)
downloadmicronucleus-b97b7ecb1633750dafc7cc60d834b510961d6cb1.tar.gz
micronucleus-b97b7ecb1633750dafc7cc60d834b510961d6cb1.tar.bz2
micronucleus-b97b7ecb1633750dafc7cc60d834b510961d6cb1.zip
firmware: Check is irrelevant - idlecount is not changed during erase
Diffstat (limited to 'firmware/main.c')
-rw-r--r--firmware/main.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/firmware/main.c b/firmware/main.c
index 89e038d..78f839a 100644
--- a/firmware/main.c
+++ b/firmware/main.c
@@ -39,15 +39,7 @@
# error "BOOTLOADER_ADDRESS in makefile must be a multiple of chip's pagesize"
#endif
-#ifdef AUTO_EXIT_MS
-# if AUTO_EXIT_MS < (MICRONUCLEUS_WRITE_SLEEP * (BOOTLOADER_ADDRESS / SPM_PAGESIZE))
-# warning "AUTO_EXIT_MS is shorter than the time it takes to perform erase function - might affect reliability?"
-# warning "Try increasing AUTO_EXIT_MS if you have stability problems"
-# endif
-#endif
-
-// events system schedules functions to run in the main loop
-// static uint8_t events = 0; // bitmap of events to run
+// command system schedules functions to run in the main loop
register uint8_t command asm( "r3" ); // register saves many bytes
enum {
@@ -57,16 +49,6 @@ enum {
cmd_exit
};
-/*
-#define EVENT_ERASE_APPLICATION 1
-#define EVENT_WRITE_PAGE 2
-#define EVENT_EXECUTE 4
-
-// controls state of events
-#define fireEvent(event) events |= (event)
-#define isEvent(event) (events & (event))
-#define clearEvents() events = 0
-*/
// Definition of sei and cli without memory barrier keyword to prevent reloading of memory variables
#define sei() asm volatile("sei")
#define cli() asm volatile("cli")