Files | |
file | rs232.h |
Header file for MSP430 RS232 driver. | |
file | rs232.c |
RS232 communication device driver for the MSP430. | |
Defines | |
#define | RS232_19200 1 |
#define | RS232_38400 2 |
#define | RS232_57600 3 |
#define | RS232_115200 4 |
Functions | |
void | rs232_init (void) |
Initialize the RS232 module. | |
void | rs232_set_input (int(*f)(unsigned char)) |
Set an input handler for incoming RS232 data. | |
void | rs232_set_speed (unsigned char speed) |
Configure the speed of the RS232 hardware. | |
void | rs232_print (char *text) |
Print a text string on RS232. | |
void | rs232_send (char c) |
Print a character on RS232. | |
interrupt (UART1RX_VECTOR) | |
void | slip_arch_writeb (unsigned char c) |
|
Initialize the RS232 module. This function is called from the boot up code to initalize the RS232 module. Definition at line 76 of file rs232.c. References NULL, RS232_57600, and rs232_set_speed(). |
|
Print a text string on RS232.
Definition at line 129 of file rs232.c. References rs232_send(). |
|
Print a character on RS232.
Definition at line 92 of file rs232.c. Referenced by rs232_print(), and slip_arch_writeb(). |
|
Set an input handler for incoming RS232 data.
The return value of the input handler affects the sleep mode of the CPU: if the input handler returns non-zero (true), the CPU is awakened to let other processing take place. If the input handler returns zero, the CPU is kept sleeping. |
|
Configure the speed of the RS232 hardware.
Definition at line 102 of file rs232.c. References RS232_115200, RS232_19200, RS232_38400, and RS232_57600. Referenced by rs232_init(). |