1 #define PIO_op_RI(op, reg, sz, val) {UDI_PIO_##op+UDI_PIO_DIRECT+UDI_PIO_##reg, UDI_PIO_##sz##BYTE, val}
2 #define PIO_MOV_RI1(reg, val) PIO_op_RI(LOAD_IMM, reg, 2, val)
3 #define PIO_OUT_RI1(reg, ofs) PIO_op_RI(OUT, reg, 1, ofs)
4 #define PIO_IN_RI1(reg, ofs) PIO_op_RI(IN, reg, 1, ofs)
9 udi_pio_trans_t uart_pio_reset[] = {
10 {UDI_PIO_END, UDI_PIO_2BYTE, 0}
15 udi_pio_trans_t uart_pio_tx[] = {
16 {UDI_PIO_END, UDI_PIO_2BYTE, 0}
19 // Recieve (interrupt)
21 udi_pio_trans_t uart_pio_rx[] = {
22 {UDI_PIO_END, UDI_PIO_2BYTE, 0}
25 #define ARRAY_SIZEOF(arr) (sizeof(arr)/sizeof(arr[0]))
28 udi_pio_trans_t *trans_list;
29 udi_ubit16_t list_length;
30 udi_ubit16_t pio_attributes;
32 [PIO_RESET] = {uart_pio_reset, ARRAY_SIZEOF(uart_pio_reset), 0},
33 [PIO_TX] = {uart_pio_tx, ARRAY_SIZEOF(uart_pio_tx), 0},
34 [PIO_RX] = {uart_pio_rx, ARRAY_SIZEOF(uart_pio_rx), 0},
36 //const int UART_NUM_PIO_OPS = ARRAY_SIZEOF(uart_pio_ops);