|
EV Logger
A MSP430 based datalogger for an electric vehicle
|
Macros | |
| #define | SPI_SIMO BIT1 |
| #define | SPI_SOMI BIT2 |
| #define | SPI_CLK BIT3 |
| #define | SD_CS BIT7 |
| #define | SPI_SEL P4SEL |
| #define | SPI_DIR P4DIR |
| #define | SPI_OUT P4OUT |
| #define | SPI_REN P4REN |
| #define | SD_CS_SEL P3SEL |
| #define | SD_CS_OUT P3OUT |
| #define | SD_CS_DIR P3DIR |
| #define | UART_BUF_LEN 50 |
| Length of the temporary buffer we will use for containing strings to be written out over the UART. More... | |
Functions | |
| void | uart_init (void) |
| Set up the UCSI for UART operation at 9600 baud. More... | |
| static void | _uart_tx (char *string) |
| Takes a char pointer, transmit data over the UART until we find a null character. More... | |
| void | uart_debug (char *string) |
| Send a CRLF terminated string to the debug output (to avoid storing the terminators in RAM all the time). More... | |
| #define UART_BUF_LEN 50 |
Length of the temporary buffer we will use for containing strings to be written out over the UART.
This should be set to at least the maximum length of any string to be transmitted, doing otherwise will cause a buffer overflow and undefined behaviour, even system crashes.
|
static |
Takes a char pointer, transmit data over the UART until we find a null character.
| string | A char pointer to the string to transmit |
| void uart_debug | ( | char * | string | ) |
Send a CRLF terminated string to the debug output (to avoid storing the terminators in RAM all the time).
| string | A char pointer to the string to transmit. |
| void uart_init | ( | void | ) |
Set up the UCSI for UART operation at 9600 baud.
The baud rate generator is currently hard coded for 25MHz SMCLK.
1.8.6