/*! \file monitor.c \brief Debugging commands, often received over UART. These commands are transacted over the UART, in much the same way that the BSL commands would be transacted. */ #include #include #include #include #include "api.h" #include "rng.h" enum { SETTURBOMODE = 0x00, PEEK = 0x01, POKE = 0x02, LCDSTRING = 0x03, DMESG = 0x04, RANDINT = 0x05, RADIOONOFF = 0x10, RADIOCONFIG = 0x11, RADIORX = 0x12, RADIOTX = 0x13 } monitor_verb; //! Local command to send the dmesg buffer. static void send_dmesg(){ uint16_t i; char *dmesg_buffer=(char*)0x2400; //Start the frame. uart_tx(0x00); uart_tx(0x80); //Length uart_tx(DMESGLEN&0xFF); uart_tx(DMESGLEN>>8); //dmesg for(i=0;i>8); //Send integers byte by byte for(i=0;i