Revision 263
starting uart tests
uart.c | ||
---|---|---|
78 | 78 |
#define UART_GET_FRAMING_ERROR (((n)&UART_FRAMING_ERROR )>>UART_FRAMING_ERROR_POS ) |
79 | 79 |
#define UART_GET_TRANSMITTER_EMPTY(n) (((n)&UART_TRANSMITTER_EMPTY )>>UART_TRANSMITTER_EMPTY_POS ) |
80 | 80 |
|
81 |
int (subscribe_uart_interrupt)(uint8_t interrupt_bit, int *interrupt_id) { |
|
82 |
if (interrupt_id == NULL) return 1; |
|
83 |
*interrupt_id = interrupt_bit; |
|
84 |
return (sys_irqsetpolicy(COM1_IRQ, IRQ_REENABLE | IRQ_EXCLUSIVE, interrupt_id)); |
|
85 |
} |
|
86 |
|
|
81 | 87 |
static void uart_parse_config(uart_config *config){ |
82 | 88 |
/// LCR |
83 | 89 |
config->bits_per_char = UART_GET_BITS_PER_CHAR (config->lcr); |
Also available in: Unified diff