15 #include "dev/uart0.h"
16 #include "dev/uart1.h"
20 static int (* uart0_input_handler)(
unsigned char c);
23 static int (* uart1_input_handler)(
unsigned char c);
29 uart0_set_input(
int (* input)(
unsigned char c))
31 uart0_input_handler = input;
34 #if UART0_CONF_WITH_INPUT
37 #if CC_CONF_OPTIMIZE_STACK_SIZE
41 uart0_rx_isr(
void) __interrupt(URX0_VECTOR)
43 ENERGEST_ON(ENERGEST_TYPE_IRQ);
45 if(uart0_input_handler !=
NULL) {
46 uart0_input_handler(U0DBUF);
48 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
56 uart1_set_input(
int (* input)(
unsigned char c))
58 uart1_input_handler = input;
61 #if UART_ONE_CONF_WITH_INPUT
64 #if CC_CONF_OPTIMIZE_STACK_SIZE
68 uart1_rx_isr(
void) __interrupt(URX1_VECTOR)
70 ENERGEST_ON(ENERGEST_TYPE_IRQ);
72 if(uart1_input_handler !=
NULL) {
73 uart1_input_handler(U1DBUF);
75 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
#define NULL
The null pointer.
Definitions for TI/Chipcon cc2530, cc2531 and cc2533 SFR registers.
Header file for the energy estimation mechanism