bf16-uartdevice.h 483 B

1234567891011121314151617181920212223
  1. #ifndef BF16_UARTDEVICE_H
  2. #define BF16_UARTDEVICE_H
  3. #include <termios.h>
  4. #include "bf16-device.h"
  5. #define UART_BUFFER_SIZE 128
  6. typedef enum {
  7. UART_CHANNEL1 = 1,
  8. UART_CHANNEL2
  9. } uart_channel_id_t;
  10. extern char *uart1_device_name;
  11. extern char *uart2_device_name;
  12. int8_t uart_init(device_t* attr, uart_channel_id_t channel_id,
  13. int8_t mode, uint32_t speed, uint16_t size);
  14. int8_t uart_transfer(device_t *attr);
  15. void uart_release(device_t *attr);
  16. #endif /* BF16_UARTDEVICE_H */