Contiki 2.5
Macros | Enumerations | Functions | Variables
LCD Functions and data

Macros

#define BASE   31250/2
 Play polyphonic tune using buzzer. More...
 
#define MEASURE_ADC2   1
 Initialize the temperature sensor ADC2=EXT_SUPL_SIG can also be measured and sent to the 1284p along with the temperature reading. More...
 

Enumerations

enum  temp_zero_offset_t
 Type used together with find_temp() to find temperature.
 
enum  temp_unit_t
 Type used with temp_get() to select temperature unit.
 

Functions

int adc_init (adc_chan_t chan, adc_trig_t trig, adc_ref_t ref, adc_ps_t prescale)
 This function will init the ADC with the following parameters. More...
 
int adc_conversion_start (void)
 This will start an ADC conversion. More...
 
int16_t adc_result_get (adc_adj_t adjust)
 This will read the ADC result during the ADC conversion and return the raw ADC conversion result. More...
 
void key_init (void)
 This will intialize the joystick and the ADC for button readings.
 
void key_deinit (void)
 This will disable the ADC used for button readings.
 
uint8_t is_button (void)
 This will poll run key_task() to determine if a button has been pressed. More...
 
uint8_t get_button (void)
 This function will wait for a user to press a button. More...
 
key_state_t key_task (void)
 This will check the joystick state to return the current button status. More...
 
key_state_t key_state_get (void)
 This function will start the ADC conversion and read the current converstion value to determine the button position. More...
 
int lcd_init (void)
 This function will initialize the proper settings for the LCD driver. More...
 
void lcd_deinit (void)
 This will disable the LCD operation.
 
uint8_t itobcd (uint8_t inNumber)
 This will convert the incoming decimal number to BCD. More...
 
int lcd_num_puthex (uint16_t numb, lcd_padding_t padding)
 This will put a HEX value on the LCD that represents the input parameter. More...
 
int lcd_num_putdec (int numb, lcd_padding_t padding)
 This will put a DEC value on the LCD that represents the input parameter. More...
 
int lcd_num_clr (void)
 This will clear numbers displayed on the LCD. More...
 
int lcd_puts (const char *s)
 This will put a string of characters out to the LCD. More...
 
int lcd_puta (size_t length, const uint8_t *s)
 This will put a string of characters of a certain length out to the LCD. More...
 
int lcd_puts_P (const char *s)
 This will put a string out to the LCD from Flash. More...
 
int lcd_putchar (unsigned char c)
 This will put a single character out to the LCD. More...
 
void lcd_symbol_set (lcd_symbol_t symbol)
 This will enable any of the symbols on the Raven LCD. More...
 
void lcd_symbol_clr (lcd_symbol_t symbol)
 This will clear any symbol on the Raven LCD. More...
 
void lcd_symbol_set_group (int start, int count)
 This will enable a group of symbols from the lcd_symbol_chart. More...
 
void lcd_symbol_clr_group (int start, int count)
 This will disable a group of symbols from the lcd_symbol_chart. More...
 
 ISR (LCD_vect)
 This is the LCD Start of Frame Interrupt Subroutine. More...
 
void led_on (void)
 Turns the Raven nose LED on.
 
void led_off (void)
 Turns the Raven nose LED off.
 
void lcd_single_print_dig (uint8_t numb, uint8_t pos)
 This will add the passed in number to any of the four locations of the four digit segment display on the LCD. More...
 
void dectoascii (uint8_t val, char *str)
 This function will convert decimal to ascii. More...
 
uint8_t * signed_dectoascii (int16_t n, uint8_t *str)
 This will convert a signed decimal number to ASCII. More...
 
void eeprom_init (void)
 This will check for DEBUG mode after power up. More...
 
void menu_run_sleep (uint8_t *val)
 This will start a sleep operation. More...
 
void menu_run_doze (uint8_t *val)
 This will start a sleep with wakes for temperature measurement and web requests. More...
 
void menu_ping_request (uint8_t *val)
 This will setup a ping request command to the 1284p and reset the ping counter. More...
 
uint8_t menu_send_ping (void)
 This will send the ping request to the 1284p via the serial port. More...
 
void menu_stop_ping (void)
 This will stop the ping request.
 
void menu_debug_mode (uint8_t *val)
 This will enable or disable the JTAG debug interface to allow for proper temperature sensor readings. More...
 
void menu_read_temp (uint8_t *val)
 This will display the temperature in degrees F or C. More...
 
void menu_display_temp (void)
 This will display the temperature in degrees F or C.
 
void menu_clear_temp (void)
 This will clear the temperature displayed in the 4 digit LCD segments.
 
void menu_prepare_temp (uint8_t *val)
 This will setup the current temperature for transfer to the ATmega1284p via a binary command transfer. More...
 
void menu_stop_temp (void)
 This will stop the auto sending of temperature data.
 
void read_menu (uint8_t ndx)
 This will read the menu_items[] from the index requested. More...
 
void check_main_menu (void)
 This will toggle the CONTIKI and 6LOWPAN LCD menus in the main menu position, unless alternate text has been sent from the 1284p. More...
 
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 stop an auto temp send. More...
 
int main (void)
 This is main...
 
void sleep_now (int howlong)
 Prepares for and executes sleep. More...
 
void sleep_wakeup (void)
 This will send a wakeup command to ATmega1284p It may already be awake, if not it will respond during the next wake cycle Upon receiving the command it will return an acknowledgement frame. More...
 
 ISR (PCINT0_vect)
 This is the wake up button interrupt. More...
 
 ISR (TIMER2_OVF_vect)
 This is the timer2 overflow interrupt. More...
 
int temp_init (void)
 This will initialize the digital IO and adc channel for temperture readings. More...
 
void temp_deinit (void)
 This will disable temperature readings by reseting the initialed flag. More...
 
int16_t temp_get (temp_unit_t unit)
 Read current temperature. More...
 
void timer_init (void)
 TIMER1 init for timer used by LCD. More...
 
void timer_start (void)
 Start the timer.
 
void timer_stop (void)
 Stop the timer.
 
 ISR (TIMER1_COMPA_vect)
 This is the interrupt subroutine for the TIMER1 output match comparison.
 
void uart_init_circ_buf (tcirc_buf *cbuf)
 This will intialize the circular buffer head and tail of tcirc_buf struct. More...
 
void uart_add_to_circ_buf (tcirc_buf *cbuf, uint8_t ch)
 This will add a new character to the circular buffer. More...
 
uint8_t uart_get_from_circ_buf (tcirc_buf *cbuf)
 This will get a character from the buffer requested. More...
 
void uart_clear_rx_buf (void)
 This will clear the RX buffer.
 
uint8_t uart_circ_buf_has_char (tcirc_buf *cbuf)
 This will check for a character in the requested buffer. More...
 
uint8_t uip_ntohex (uint8_t val)
 This will convert a nibble to a hex value. More...
 
void itohex (uint8_t val, char *str)
 Convert integer to hex value. More...
 
uint8_t uart_get_char_rx (void)
 This will wait for a new character from the ATmega1284p and timeout if no new character is received. More...
 
void uart_init (void)
 Initialize UART to 38400 Baud Rate and only enable UART for transmission. More...
 
void uart_deinit (void)
 Turn off UART for sleep mode.
 
void uart_send_byte (uint8_t byte)
 Send one byte over the uart. More...
 
 ISR (USART_RX_vect)
 This is the USART RX complete interrupt.
 
void uart_serial_send_frame (uint8_t cmd, uint8_t payload_length, uint8_t *payload)
 This function builds and sends a binary command frame to the ATmega1284p. More...
 
void uart_timeout_msg (uint8_t x)
 This displays a time out message to the user based on the parameter reason x. More...
 
void uart_serial_rcv_frame (uint8_t wait_for_ack)
 This will receive a frame from the ATmega1284p and parse the incoming data. More...
 

Variables

uint16_t ADC2_reading
 This will send the data via the serial port. More...
 
bool temp_initialized = false
 Flag indicating initialized or not.
 
uint16_t ADC2_reading
 This will turn on the adc channel for reading the temp sensor. More...
 
tcirc_buf rxbuf
 The RX circular buffer, for storing characters from serial port. More...
 

Definition of Port Pin for temp sensor.

#define TEMP_PORT   PORTF
 
#define TEMP_DDR   DDRF
 
#define TEMP_PIN   PINF
 
#define TEMP_BIT_IN   4
 
#define TEMP_BIT_PWR   6
 

Detailed Description

Macro Definition Documentation

#define BASE   31250/2

Play polyphonic tune using buzzer.

An 8 bit timer generates interrupts that flip the BEEP pin at the selected frequencies. On exit the beeper port pin is set low to shut down the speaker amplifier.

Definition at line 103 of file beep.c.

#define MEASURE_ADC2   1

Initialize the temperature sensor ADC2=EXT_SUPL_SIG can also be measured and sent to the 1284p along with the temperature reading.

Returns
EOF on error

Definition at line 75 of file temp.h.

Function Documentation

int adc_conversion_start ( void  )

This will start an ADC conversion.

Returns
0

Definition at line 105 of file adc.c.

Referenced by key_state_get(), and temp_get().

int adc_init ( adc_chan_t  chan,
adc_trig_t  trig,
adc_ref_t  ref,
adc_ps_t  prescale 
)

This function will init the ADC with the following parameters.

Parameters
chanDetermines the ADC channel to open.
trigSets what type of trigger is needed.
refSets the proper reference voltage.
prescaleSets the prescale to be used against the XTAL choice.
Returns
0

Definition at line 65 of file adc.c.

int16_t adc_result_get ( adc_adj_t  adjust)

This will read the ADC result during the ADC conversion and return the raw ADC conversion result.

Parameters
adjustThis will Left or Right Adjust the ADC conversion result.
Returns
ADC raw 16-byte ADC conversion result.

Definition at line 126 of file adc.c.

Referenced by key_state_get(), and temp_get().

void check_main_menu ( void  )

This will toggle the CONTIKI and 6LOWPAN LCD menus in the main menu position, unless alternate text has been sent from the 1284p.

The other menus will display normally.

Definition at line 278 of file raven3290.c.

References lcd_puts(), lcd_puts_P(), read_menu(), and tmenu_item::text.

Referenced by main().

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 stop an auto temp send.

Also check for stopping a ping request.

Definition at line 307 of file raven3290.c.

References lcd_num_clr(), menu_clear_temp(), menu_stop_ping(), menu_stop_temp(), and tmenu_item::text.

Referenced by main().

void dectoascii ( uint8_t  val,
char *  str 
)

This function will convert decimal to ascii.

Parameters
valDecimal value to convert.
strAddress location to store converted value.

Definition at line 76 of file menu.c.

Referenced by uart_timeout_msg().

void eeprom_init ( void  )

This will check for DEBUG mode after power up.

Initialize the EEPROM module.

Definition at line 142 of file menu.c.

References menu_debug_mode().

Referenced by main().

uint8_t get_button ( void  )

This function will wait for a user to press a button.

Returns
retval Returns the global button state.

Definition at line 114 of file key.c.

References is_button().

Referenced by main(), menu_run_doze(), and menu_run_sleep().

uint8_t is_button ( void  )

This will poll run key_task() to determine if a button has been pressed.

Return values
Trueif button is pressed
Falseif button is not pressed

Definition at line 95 of file key.c.

References key_task().

Referenced by get_button(), main(), menu_run_doze(), and menu_run_sleep().

ISR ( PCINT0_vect  )

This is the wake up button interrupt.

When this interrupt fires, nothing is done. The program will simply continue from the end of the sleep command.

Definition at line 146 of file sleep.c.

ISR ( TIMER2_OVF_vect  )

This is the timer2 overflow interrupt.

When this interrupt fires, the CPU will wake.

Definition at line 157 of file sleep.c.

ISR ( LCD_vect  )

This is the LCD Start of Frame Interrupt Subroutine.

This interrupt fires at the beginning of a new frame.

Definition at line 846 of file lcd.c.

uint8_t itobcd ( uint8_t  inNumber)

This will convert the incoming decimal number to BCD.

Parameters
inNumberDecimal number to convert
Returns
newByte The converted deicmal number as byte.

Definition at line 356 of file lcd.c.

Referenced by lcd_num_putdec().

void itohex ( uint8_t  val,
char *  str 
)

Convert integer to hex value.

Parameters
valValue to convert to hex.
strLocation to store converted value.

Definition at line 179 of file uart.c.

References uip_ntohex().

key_state_t key_state_get ( void  )

This function will start the ADC conversion and read the current converstion value to determine the button position.

Return values
KEY_ENTEREnter button has been pressed.
KEY_UPUp Button has been pressed.
KEY_RIGHTRight Button has been pressed.
KEY_LEFTLeft Button has been pressed.
KEY_DOWNDown Button has been pressed.
KEY_NO_KEYNo Button has been pressed.

Definition at line 174 of file key.c.

References adc_conversion_start(), and adc_result_get().

Referenced by key_task(), menu_run_doze(), and menu_run_sleep().

key_state_t key_task ( void  )

This will check the joystick state to return the current button status.

Returns
button Current button state.

Definition at line 133 of file key.c.

References key_state_get().

Referenced by is_button().

int lcd_init ( void  )

This function will initialize the proper settings for the LCD driver.

Initialization and configuration of the LCD controller.

This ATmega3290p can directly support an LCD through register mapping.

Returns
0

Definition at line 277 of file lcd.c.

Referenced by main(), menu_run_doze(), and menu_run_sleep().

int lcd_num_clr ( void  )

This will clear numbers displayed on the LCD.

Returns
0

Definition at line 428 of file lcd.c.

Referenced by check_menu(), and menu_clear_temp().

int lcd_num_putdec ( int  numb,
lcd_padding_t  padding 
)

This will put a DEC value on the LCD that represents the input parameter.

Parameters
numbNumber to display as DEC.
paddingThis pads the location to place the value on the LCD.
Returns
lcd_num_print()

Definition at line 402 of file lcd.c.

References abs(), and itobcd().

Referenced by menu_display_temp().

int lcd_num_puthex ( uint16_t  numb,
lcd_padding_t  padding 
)

This will put a HEX value on the LCD that represents the input parameter.

Parameters
numbNumber to display as HEX.
paddingThis pads the location to place the value on the LCD.
Returns
lcd_num_print()

Definition at line 385 of file lcd.c.

int lcd_puta ( size_t  length,
const uint8_t *  s 
)

This will put a string of characters of a certain length out to the LCD.

Parameters
lengthLength of string to print.
sFirst character pointer of string.
Returns
0

Definition at line 475 of file lcd.c.

int lcd_putchar ( unsigned char  c)

This will put a single character out to the LCD.

Parameters
cCharacter to display on LCD.
Returns
0

Definition at line 521 of file lcd.c.

int lcd_puts ( const char *  s)

This will put a string of characters out to the LCD.

Parameters
sFirst character pointer of string.
Returns
0

Definition at line 451 of file lcd.c.

Referenced by check_main_menu(), and uart_timeout_msg().

int lcd_puts_P ( const char *  s)

This will put a string out to the LCD from Flash.

Parameters
sFirst character pointer of the string located in Flash
Returns
0

Definition at line 498 of file lcd.c.

Referenced by check_main_menu(), main(), and sleep_wakeup().

void lcd_single_print_dig ( uint8_t  numb,
uint8_t  pos 
)

This will add the passed in number to any of the four locations of the four digit segment display on the LCD.

Parameters
numbNumber to display.
posPosition to display number.

Definition at line 890 of file lcd.c.

Referenced by menu_ping_request(), and uart_serial_rcv_frame().

void lcd_symbol_clr ( lcd_symbol_t  symbol)

This will clear any symbol on the Raven LCD.

Parameters
symbolSpecific symbol to clear from the LCD.

Definition at line 566 of file lcd.c.

Referenced by lcd_symbol_clr_group(), menu_clear_temp(), menu_display_temp(), and uart_serial_rcv_frame().

void lcd_symbol_clr_group ( int  start,
int  count 
)

This will disable a group of symbols from the lcd_symbol_chart.

Parameters
startPosition of table to start from.
countNumber of symbols to disable from start position.

Definition at line 614 of file lcd.c.

References lcd_symbol_clr().

void lcd_symbol_set ( lcd_symbol_t  symbol)

This will enable any of the symbols on the Raven LCD.

Parameters
symbolSpecific symbol to enable on the LCD.

Definition at line 541 of file lcd.c.

Referenced by lcd_symbol_set_group(), main(), menu_display_temp(), menu_run_doze(), menu_run_sleep(), and uart_serial_rcv_frame().

void lcd_symbol_set_group ( int  start,
int  count 
)

This will enable a group of symbols from the lcd_symbol_chart.

Parameters
startPosition of table to start from.
countNumber of symbols to enable from start position.

Definition at line 593 of file lcd.c.

References lcd_symbol_set().

void menu_debug_mode ( uint8_t *  val)

This will enable or disable the JTAG debug interface to allow for proper temperature sensor readings.

Parameters
valFlag to trigger the proper debug mode.

Definition at line 323 of file menu.c.

References temp_init().

Referenced by eeprom_init().

void menu_ping_request ( uint8_t *  val)

This will setup a ping request command to the 1284p and reset the ping counter.

Parameters
valplace holder

Definition at line 264 of file menu.c.

References lcd_single_print_dig(), and menu_send_ping().

void menu_prepare_temp ( uint8_t *  val)

This will setup the current temperature for transfer to the ATmega1284p via a binary command transfer.

Parameters
valThis is used to determine sending once or auto based on the timer.

Definition at line 424 of file menu.c.

void menu_read_temp ( uint8_t *  val)

This will display the temperature in degrees F or C.

Parameters
valFlag to trigger F or C temperature conversion.

Definition at line 354 of file menu.c.

References menu_display_temp().

void menu_run_doze ( uint8_t *  val)

This will start a sleep with wakes for temperature measurement and web requests.

Parameters
valUsed for remembering the new menu to display after a wakeup.

Definition at line 215 of file menu.c.

References get_button(), is_button(), key_state_get(), lcd_deinit(), lcd_init(), lcd_symbol_set(), led_off(), sleep_now(), sleep_wakeup(), and uart_serial_send_frame().

void menu_run_sleep ( uint8_t *  val)

This will start a sleep operation.

Parameters
valUsed for remembering the new menu to display after a wakeup.

Definition at line 165 of file menu.c.

References get_button(), is_button(), key_deinit(), key_init(), key_state_get(), lcd_deinit(), lcd_init(), lcd_symbol_set(), led_off(), sleep_now(), sleep_wakeup(), uart_deinit(), and uart_serial_send_frame().

uint8_t menu_send_ping ( void  )

This will send the ping request to the 1284p via the serial port.

Returns
ping_count The number of ping attempts.

Definition at line 290 of file menu.c.

References uart_serial_send_frame().

Referenced by main(), and menu_ping_request().

void read_menu ( uint8_t  ndx)

This will read the menu_items[] from the index requested.

Parameters
ndxPosition index of menu_items[] lookup.

Definition at line 258 of file raven3290.c.

Referenced by check_main_menu(), and main().

uint8_t* signed_dectoascii ( int16_t  n,
uint8_t *  str 
)

This will convert a signed decimal number to ASCII.

Parameters
nSigned number
strPointer to store converted value.
Returns
*p Address of stored conversion.

Definition at line 93 of file menu.c.

void sleep_now ( int  howlong)

Prepares for and executes sleep.

This function sets up the processor to enter sleep mode, and to wake up when the joystick button (PE2/PCINT2) is pressed or after the specified interval.

Parameters
howlongSeconds to sleep, 0=until button pushed

Definition at line 68 of file sleep.c.

Referenced by menu_run_doze(), and menu_run_sleep().

void sleep_wakeup ( void  )

This will send a wakeup command to ATmega1284p It may already be awake, if not it will respond during the next wake cycle Upon receiving the command it will return an acknowledgement frame.

This will send a single character forever to the ATmega1284p to cause a wakeup. The 1284p polls the USART for new data during each sleep cycle. Upon receiving a character from the user LCD, it will wake up and send an acknowledgement frame.

Definition at line 122 of file sleep.c.

References lcd_puts_P(), uart_serial_rcv_frame(), and uart_serial_send_frame().

Referenced by menu_run_doze(), and menu_run_sleep().

void temp_deinit ( void  )

This will disable temperature readings by reseting the initialed flag.

De-initialize the temperature sensor.

Definition at line 145 of file temp.c.

References temp_initialized.

int16_t temp_get ( temp_unit_t  unit)

Read current temperature.

Parameters
[in]unitSelected temperature unit (temp_unit_t)
Returns
EOF on error

Definition at line 170 of file temp.c.

References ADC2_reading, adc_conversion_start(), adc_deinit(), ADC_REF_AVCC, adc_result_get(), key_init(), and temp_initialized.

Referenced by menu_display_temp().

int temp_init ( void  )

This will initialize the digital IO and adc channel for temperture readings.

Optionally enable adc channel 2 for measurement of EXT_SUPL_SIG.

Return values
0Place holder for returning status.

Definition at line 113 of file temp.c.

References temp_initialized.

Referenced by main(), and menu_debug_mode().

void timer_init ( void  )

TIMER1 init for timer used by LCD.

The FPU of 8MHz with a prescaler of 1024 equals 7812.5 timer ticks creating a resolution of 128us per tick.

NOTE: The TIMER1 interrupt is not enabled in this routine

Definition at line 62 of file timer.c.

Referenced by main().

void uart_add_to_circ_buf ( tcirc_buf cbuf,
uint8_t  ch 
)

This will add a new character to the circular buffer.

Parameters
cbufPointer to buffer where character will be stored.
chCharacter to store into buffer.

Definition at line 80 of file uart.c.

References tcirc_buf::buf, tcirc_buf::head, and tcirc_buf::tail.

Referenced by ISR().

uint8_t uart_circ_buf_has_char ( tcirc_buf cbuf)

This will check for a character in the requested buffer.

Parameters
cbufPointer to buffer to check for any characters.
Returns
True if buffer empty.

Definition at line 143 of file uart.c.

References tcirc_buf::head, and tcirc_buf::tail.

uint8_t uart_get_char_rx ( void  )

This will wait for a new character from the ATmega1284p and timeout if no new character is received.

Return values
TIMEOUTReturns if timeout has occured.
Returns
retval Character returned upon seeing rx_char_ready()

Definition at line 195 of file uart.c.

References uart_get_from_circ_buf().

Referenced by uart_serial_rcv_frame().

uint8_t uart_get_from_circ_buf ( tcirc_buf cbuf)

This will get a character from the buffer requested.

Parameters
cbufPointer to buffer to get character from.
Returns
retval Return character from buffer.

Definition at line 107 of file uart.c.

References tcirc_buf::buf, and tcirc_buf::tail.

Referenced by uart_get_char_rx().

void uart_init ( void  )

Initialize UART to 38400 Baud Rate and only enable UART for transmission.

Initialize the UART module.

Definition at line 219 of file uart.c.

References uart_clear_rx_buf().

void uart_init_circ_buf ( tcirc_buf cbuf)

This will intialize the circular buffer head and tail of tcirc_buf struct.

Parameters
cbufPointer to buffer to initialize.

Definition at line 66 of file uart.c.

References tcirc_buf::head, and tcirc_buf::tail.

void uart_send_byte ( uint8_t  byte)

Send one byte over the uart.

This is called to send binary commands.

Parameters
byteThe byte of data to send out the uart.

Definition at line 258 of file uart.c.

Referenced by uart_serial_send_frame().

void uart_serial_rcv_frame ( uint8_t  wait_for_ack)

This will receive a frame from the ATmega1284p and parse the incoming data.

If the incoming data is a binary command acknowledgement, then this will not parse any data. If the incoming data is test reports, the menu will store the data for end of test metrics.

Parameters
wait_for_ackFlag used to wait for acknowledgement when receving a serial frame.

Definition at line 340 of file uart.c.

References beep(), EOF_CHAR, lcd_single_print_dig(), lcd_symbol_clr(), lcd_symbol_set(), led_off(), led_on(), SOF_CHAR, uart_get_char_rx(), and uart_timeout_msg().

Referenced by main(), and sleep_wakeup().

void uart_serial_send_frame ( uint8_t  cmd,
uint8_t  payload_length,
uint8_t *  payload 
)

This function builds and sends a binary command frame to the ATmega1284p.

Parameters
cmdCommand to send.
payload_lengthLength of data to be sent with command.
payloadPointer to data to send.

Definition at line 295 of file uart.c.

References EOF_CHAR, SOF_CHAR, and uart_send_byte().

Referenced by menu_run_doze(), menu_run_sleep(), menu_send_ping(), and sleep_wakeup().

void uart_timeout_msg ( uint8_t  x)

This displays a time out message to the user based on the parameter reason x.

Parameters
xReason for USART time out.

Definition at line 318 of file uart.c.

References dectoascii(), and lcd_puts().

Referenced by uart_serial_rcv_frame().

uint8_t uip_ntohex ( uint8_t  val)

This will convert a nibble to a hex value.

Parameters
valValue to convert to hex.
Returns
val Converted hex value

Definition at line 159 of file uart.c.

Referenced by itohex().

Variable Documentation

uint16_t ADC2_reading

This will turn on the adc channel for reading the temp sensor.

This will send the data via the serial port.

After the raw adc value is stored, it will be used to lookup a degree conversion based on the tables for F or C. Optionally, EXT_SUPL_SIG is also read on channel 2 and stored in the global ADC2_reading for subsequent transfer to the 1284p web server.

Parameters
unitUsed to determine what unit needs to be appended with the value.
Returns
EOF This is an uninitialized adc error.
Return values
tempThe newly converted value in degrees F or C.

Definition at line 166 of file temp.c.

Referenced by temp_get().

uint16_t ADC2_reading

This will send the data via the serial port.

This will send the data via the serial port.

After the raw adc value is stored, it will be used to lookup a degree conversion based on the tables for F or C. Optionally, EXT_SUPL_SIG is also read on channel 2 and stored in the global ADC2_reading for subsequent transfer to the 1284p web server.

Parameters
unitUsed to determine what unit needs to be appended with the value.
Returns
EOF This is an uninitialized adc error.
Return values
tempThe newly converted value in degrees F or C.

Definition at line 166 of file temp.c.

Referenced by temp_get().

tcirc_buf rxbuf

The RX circular buffer, for storing characters from serial port.

Definition at line 56 of file uart.c.

Referenced by serial_line_input_byte().