Revision 242
working on uart. done with first and second test functions
uart.h | ||
---|---|---|
4 | 4 |
#include "uart_macros.h" |
5 | 5 |
|
6 | 6 |
typedef struct { |
7 |
int base_addr; |
|
8 |
uint8_t config; |
|
9 |
uint8_t dll; |
|
10 |
uint8_t dlm; |
|
11 |
uint8_t bits_per_char; |
|
12 |
uint8_t stop_bits; |
|
13 |
uint8_t parity; |
|
14 |
uint8_t break_control; |
|
15 |
uint8_t dlab; |
|
16 |
uint16_t divisor_latch; |
|
7 |
int base_addr ; |
|
8 |
uint8_t lcr ; |
|
9 |
uint8_t dll ; |
|
10 |
uint8_t dlm ; |
|
11 |
uint8_t bits_per_char ; |
|
12 |
uint8_t stop_bits ; |
|
13 |
uint8_t parity ; |
|
14 |
uint8_t break_control :1; |
|
15 |
uint8_t dlab :1; |
|
16 |
uint16_t divisor_latch ; |
|
17 |
uint8_t ier ; |
|
18 |
uint8_t received_data_int :1; |
|
19 |
uint8_t transmitter_empty_int :1; |
|
20 |
uint8_t receiver_line_stat_int:1; |
|
21 |
uint8_t modem_stat_int :1; |
|
17 | 22 |
} uart_config; |
18 | 23 |
|
19 | 24 |
int uart_get_config(int base_addr, uart_config *config); |
Also available in: Unified diff