[tuxdroid-svn] r324 - firmware/tuxcore/trunk
Status: Beta
Brought to you by:
ks156
From: jaguarondi <c2m...@c2...> - 2007-05-25 17:05:19
|
Author: jaguarondi Date: 2007-05-25 19:04:52 +0200 (Fri, 25 May 2007) New Revision: 324 Modified: firmware/tuxcore/trunk/Makefile firmware/tuxcore/trunk/main.c firmware/tuxcore/trunk/parser.c firmware/tuxcore/trunk/standalone.c Log: - UPD: ISP programming from the Makefile now also handles the eeprom and the bootloader. - some minor comment updates. Modified: firmware/tuxcore/trunk/Makefile =================================================================== --- firmware/tuxcore/trunk/Makefile 2007-05-25 17:02:03 UTC (rev 323) +++ firmware/tuxcore/trunk/Makefile 2007-05-25 17:04:52 UTC (rev 324) @@ -169,8 +169,14 @@ prog: $(PROJECT).hex tuxup $(PROJECT).hex $(PROJECT).eep -progisp: $(PROJECT).hex - AVRDUDE -p $(MCU) -c jtag2isp -P usb -B 10 -e -U flash:w:$(PROJECT).hex +progisp: $(PROJECT).hex $(PROJECT).eep + $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -progstk: $(PROJECT).hex - AVRDUDE -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex +progisp_bl: $(PROJECT).hex $(PROJECT).eep $(PROJECT)_bl.hex + $(AVRDUDE) -p $(MCU) -c jtag2isp -P usb -B 10 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -D -U flash:w:$(PROJECT)_bl.hex + +progstk: $(PROJECT).hex $(PROJECT).eep + $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep + +progstk_bl: $(PROJECT).hex $(PROJECT).eep $(PROJECT)_bl.hex + $(AVRDUDE) -p $(MCU) -c stk500v2 -e -U flash:w:$(PROJECT).hex -U eeprom:w:$(PROJECT).eep -D -U flash:w:$(PROJECT)_bl.hex Modified: firmware/tuxcore/trunk/main.c =================================================================== --- firmware/tuxcore/trunk/main.c 2007-05-25 17:02:03 UTC (rev 323) +++ firmware/tuxcore/trunk/main.c 2007-05-25 17:04:52 UTC (rev 324) @@ -37,8 +37,8 @@ /* * Debug and test flags */ -#define DBG_STACK 0 -#define TEST_CHARGER 0 /* Use eyes LED's to indicate charger status */ +#define DBG_STACK 0 /* stack overflow detection */ +#define TEST_CHARGER 0 /* use eyes LED's to indicate charger status */ void ioInit(void); void timer2Init(void); Modified: firmware/tuxcore/trunk/parser.c =================================================================== --- firmware/tuxcore/trunk/parser.c 2007-05-25 17:02:03 UTC (rev 323) +++ firmware/tuxcore/trunk/parser.c 2007-05-25 17:04:52 UTC (rev 324) @@ -39,7 +39,7 @@ { uint8_t i; - /* Moves */ + /* Check new conditions and update status from tuxaudio */ if (command[0] == SEND_AUDIOSENSORS_CMD) { if ((command[1] & STATUS_HEADBTN_MK) @@ -66,6 +66,8 @@ gStatus.bat = command[3]; return; } + + /* Moves */ else if (command[0] == BLINK_EYES_CMD) { blinkEyes(command[1]); @@ -257,7 +259,7 @@ /* Extract a command from the buffer */ cli(); /* XXX check if we can only disable the twi interrupts here */ - /* XXX commented the cli sei because we are in an interrupt, if this code is moved outside, we should replace them */ + /* XXX we should be able to replace this block with the split_command_parser above */ commandType = commandBuf[commandBufIdx - 1] >> 6; /* commandType is 0-3 (num from 0 to 3) if the command is 0-3 bytes long */ for (i = 0; i <= commandType; i++) /* so we loop 1-4 times here to get all command bytes */ { Modified: firmware/tuxcore/trunk/standalone.c =================================================================== --- firmware/tuxcore/trunk/standalone.c 2007-05-25 17:02:03 UTC (rev 323) +++ firmware/tuxcore/trunk/standalone.c 2007-05-25 17:04:52 UTC (rev 324) @@ -205,7 +205,7 @@ if ((!test_mode) || (test_mode == BT_REMOTE)) { /* Disable spinning when plugged */ - if ((gStatus.sw & GSTATUS_POWERPLUGSW_MK)) /* disable spinning when plugged */ + if ((gStatus.sw & GSTATUS_POWERPLUGSW_MK)) { stopSpin(); /* flush the spinning commands */ spinPosCnt = 0; |