Functions | |
void | send_rs_int (int val) |
Send int value to serial output in ASCII code. | |
void | send_rs_str (char data[]) |
Send string to serial output in ASCII code. | |
void | init_uart (void) |
Initialize UART - platform dependent. | |
char | uart_get_char (void) |
Read one char from uart. | |
void | uart_send_char (char val) |
Send one char to uart. | |
int | lpcan_btr (uint32_t *btr, int rate, int clock, int sjw, int sampl_pt, int sam) |
void init_uart | ( | void | ) |
Initialize UART - platform dependent.
int lpcan_btr | ( | uint32_t * | btr, | |
int | rate, | |||
int | clock, | |||
int | sjw, | |||
int | sampl_pt, | |||
int | sam | |||
) |
btr | pointer to resulting BTR bit timing register value | |
rate | bit rate [bit/s] | |
clock | peripheral bus clock frequency [Hz] | |
sjw | Synchronization Jump Width (0..3) | |
sampl_pt | sampling point position 0<sampl_pt<100 [%] | |
sam | 0 for bus being sampled once, 1 for bus being sampled 3x |
Calculate the bit timing register (BTR) value according to given frequency and sampling specification.
void send_rs_int | ( | int | val | ) |
Send int value to serial output in ASCII code.
Removes unused zeros.
val | value to print |
void send_rs_str | ( | const char | data[] | ) |
Send string to serial output in ASCII code.
data[] | string to print |
char uart_get_char | ( | void | ) |
Read one char from uart.
void uart_send_char | ( | char | val | ) |
Send one char to uart.