156 #include <avr/fuse.h>
170 #if defined( DOXYGEN )
171 const char menu_text0[];
172 const char menu_text1[];
173 const char menu_text2[];
174 const char menu_text3[];
175 const char menu_text4[];
176 const char menu_text5[];
177 const char menu_text6[];
178 const char menu_text7[];
179 const char menu_text8[];
180 const char menu_text9[];
181 const char menu_text10[];
182 const char menu_text11[];
183 const char menu_text12[];
184 const char menu_text13[];
185 const char menu_text14[];
186 const char menu_text15[];
187 const char menu_text16[];
188 const char menu_text17[];
192 const char menu_text0[]
PROGMEM =
"CONTIKI";
193 const char menu_text1[]
PROGMEM =
"6LOWPAN";
194 const char menu_text2[]
PROGMEM =
"PING";
195 const char menu_text3[]
PROGMEM =
"PINGING";
196 const char menu_text4[]
PROGMEM =
"TEMP";
197 const char menu_text5[]
PROGMEM =
"MODE ";
198 const char menu_text6[]
PROGMEM =
"DEG F";
199 const char menu_text7[]
PROGMEM =
"DEG C";
200 const char menu_text8[]
PROGMEM =
"SEND";
201 const char menu_text9[]
PROGMEM =
"ONCE";
202 const char menu_text10[]
PROGMEM =
"AUTO";
203 const char menu_text11[]
PROGMEM =
"DEBUG";
204 const char menu_text12[]
PROGMEM =
"DBG ON";
205 const char menu_text13[]
PROGMEM =
"DBG OFF";
206 const char menu_text14[]
PROGMEM =
"SENT";
207 const char menu_text15[]
PROGMEM =
"SENDING";
208 const char menu_text16[]
PROGMEM =
"SLEEP";
209 const char menu_text17[]
PROGMEM =
"DOZE";
222 {menu_text0, 0, 2, 0, 0, 0, 0 },
223 {menu_text1, 0, 2, 0, 0, 0, 0 },
225 {menu_text3, 2, 2, 2, 2, 0, 0 },
226 {menu_text4, 0, 5, 2, 11, 0, 0 },
227 {menu_text5, 4, 6, 8, 8, 0, 0 },
230 {menu_text8, 4, 9, 5, 5, 0, 0 },
233 {menu_text11, 0, 12, 4, 16, 0, 0 },
236 {menu_text14, 9, 14, 14, 14, 0, 0 },
237 {menu_text15, 10, 15, 15, 15, 0, 0 },
245 key_state_t button=KEY_STATE_NO_KEY;
248 uint8_t timeout_count;
262 uint8_t *src = (uint8_t*)&menu_items[ndx];
263 uint8_t *dest = (uint8_t*)&menu;
266 *dest++ = pgm_read_byte(src+i);
271 char top_menu_text[20];
282 if(menu.
text == menu_text0){
286 else if(menu.
text == menu_text1){
291 if (top_menu_text[0]) {
309 if(menu.
text == menu_text12){
313 if(menu.
text == menu_text10){
317 if(menu.
text == menu_text2){
374 if((PING_ATTEMPTS == count) && !timeout_flag){
379 else if(timeout_flag){
380 timeout_flag =
false;
383 if(PING_ATTEMPTS == timeout_count){
This file provides joystick operations.
int temp_init(void)
This will initialize the digital IO and adc channel for temperture readings.
void menu_display_temp(void)
This will display the temperature in degrees F or C.
void menu_ping_request(uint8_t *val)
This will setup a ping request command to the 1284p and reset the ping counter.
int lcd_puts(const char *s)
This will put a string of characters out to the LCD.
uint8_t right
Contains next menu position for right.
void menu_debug_mode(uint8_t *val)
This will enable or disable the JTAG debug interface to allow for proper temperature sensor readings...
uint8_t left
Contains next menu position for left.
tmenufunc enter_func
Pointer to function to call when enter button is pressed.
uint8_t up
Contains next menu position for up.
void check_main_menu(void)
This will toggle the CONTIKI and 6LOWPAN LCD menus in the main menu position, unless alternate text h...
void menu_clear_temp(void)
This will clear the temperature displayed in the 4 digit LCD segments.
void uart_init(const unsigned int uart_num, uint32_t module_clk_hz, const uint32_t baud)
Initialize UART.
int lcd_puts_P(const char *s)
This will put a string out to the LCD from Flash.
Interface for the onboard temperature sensor.
This file supports the timer functionality for the LCD.
void menu_stop_ping(void)
This will stop the ping request.
void uart_serial_rcv_frame(uint8_t wait_for_ack)
This will receive a frame from the ATmega1284p and parse the incoming data.
int main(void)
This is main...
void menu_run_doze(uint8_t *val)
This will start a sleep with wakes for temperature measurement and web requests.
Handles the control of the USART for communication with the ATmega1284p for sending commands...
const uint32_t OIDSupportedList[] PROGMEM
List of supported RNDIS OID's.
void menu_prepare_temp(uint8_t *val)
This will setup the current temperature for transfer to the ATmega1284p via a binary command transfer...
uint8_t * state
State variable used as argument for menu enter function.
void timer_start(void)
Start the timer.
void eeprom_init(void)
Initialize the EEPROM module.
void menu_run_sleep(uint8_t *val)
This will start a sleep operation.
int lcd_num_clr(void)
This will clear numbers displayed on the LCD.
void lcd_symbol_set(lcd_symbol_t symbol)
This will enable any of the symbols on the Raven LCD.
This is the main file for the Raven LCD application.
void check_menu(void)
This will check for the temp menu screen to determine if we need to clear the 4 digit LCD segments or...
uint8_t menu_send_ping(void)
This will send the ping request to the 1284p via the serial port.
void read_menu(uint8_t ndx)
This will read the menu_items[] from the index requested.
uint8_t down
Contains next menu position for down.
uint8_t is_button(void)
This will poll run key_task() to determine if a button has been pressed.
void menu_read_temp(uint8_t *val)
This will display the temperature in degrees F or C.
const char *PROGMEM text
Menu text to display.
void timer_init(void)
TIMER1 init for timer used by LCD.
This structure defines the joystick operation within the menu_items[].
void menu_stop_temp(void)
This will stop the auto sending of temperature data.
This file operates the menu flow chart described in the readme notes.
int lcd_init(void)
This function will initialize the proper settings for the LCD driver.
uint8_t get_button(void)
This function will wait for a user to press a button.
void key_init(void)
This will intialize the joystick and the ADC for button readings.