Added LED test into monitor, supporting increased LEDs on the apimote and telosb...
[goodfet] / firmware / include / chipcon.h
index 3bf3da1..4b01b64 100644 (file)
@@ -3,7 +3,13 @@
   \brief Chipcon application functions.
 */
 
+#ifndef CHIPCON_H
+#define CHIPCON_H
+
 #include "command.h"
+#include "app.h"
+
+#define CHIPCON 0x30
 
 //Chipcon command definitions.
 #define CCCMD_CHIP_ERASE 0x14
@@ -19,6 +25,9 @@
 #define CCCMD_STEP_INSTR 0x5C
 #define CCCMD_DEBUG_INSTR 0x54
 
+//! Flash Word Size
+extern u8 flash_word_size;
+
 //! Erase a chipcon chip.
 void cc_chip_erase();
 //! Write the configuration byte.
@@ -39,6 +48,10 @@ void cc_debug_instr(unsigned char);
 unsigned char cc_peekcodebyte(unsigned long adr);
 //!Read a byte of data memory.
 unsigned char cc_peekdatabyte(unsigned int adr);
+//! Fetch a byte of IRAM.
+u8 cc_peekirambyte(u8 adr);
+//! Write a byte of IRAM.
+u8 cc_pokeirambyte(u8 adr, u8 val);
 //! Set a byte of data memory.
 unsigned char cc_pokedatabyte(unsigned int adr,
                              unsigned char val);
@@ -100,3 +113,7 @@ void cc_lockchip();
 #define CC_PROGRAM_FLASH 0x98
 #define CC_WIPEFLASHBUFFER 0x99
 #define CC_LOCKCHIP 0x9A
+
+extern app_t const chipcon_app;
+
+#endif // CHIPCON_H