#ifndef EGGMOTE_H #define EGGMOTE_H enum { AM_DATAMSG = 83, AM_CMDMSG = 84, CMD_ERASE = 1, CMD_WRITE = 2, CMD_READ = 3, CMD_SYNC = 4, MAXWRITEBEFORESYNC = 10000, }; typedef nx_struct CmdMsg { nx_uint8_t cmd; nx_uint16_t value; } CmdMsg_t; typedef nx_struct DataMsg{ nx_uint16_t temp; nx_uint16_t hum; nx_uint16_t tsr; nx_uint16_t ar; nx_uint16_t volt; nx_uint16_t id; }DataMsg_t; // debug stuff enum { DBG_STRING_LEN = 19, DBG_STRING = 1, DBG_UINT = 2, DBG_INT = 4, AM_DBGMSG = 100 }; typedef nx_struct DbgMsg{ nx_uint8_t flavour; nx_uint16_t unsigned16; nx_int16_t signed16; nx_uint8_t string[DBG_STRING_LEN]; }DbgMsg_t; // end debug stuff #endif