77 byte |= ((
u8) parity) << 3;
93 case MODEM_DTR:
byte.bits.b0 = enable;
break;
94 case MODEM_RTS:
byte.bits.b1 = enable;
break;
96 case MODEM_IRQ:
byte.bits.b3 = enable;
break;
126 const char challenge =
'H';
127 char response = { 0 };
161 for (; i < length; i++)
171 for (
size_t i = 0; i < length; i++)
int serial_device_read(serial_device_t *device, char *data, size_t length)
static char serial_get_line_status(serial_device_t *dev)
bool serial_dev_get_data_ready(serial_device_t *device)
static void set_parity(serial_device_t *dev, serial_parity_t parity)
static void serial_dev_wait_ready_to_write(serial_device_t *device)
static void serial_set_modem_options(serial_device_t *dev, serial_modem_control_t control, bool enable)
static void set_stop_bits(serial_device_t *dev)
@ LINE_TRANSMITR_BUF_EMPTY
static void set_data_bits(serial_device_t *dev)
static void serial_dev_wait_ready_to_read(serial_device_t *device)
bool serial_device_setup(serial_device_t *device)
@ MODEM_DATA_CARRIER_DETECT
int serial_device_write(serial_device_t *device, const char *data, size_t length)
static void set_baudrate_divisor(serial_device_t *dev)
static void serial_set_interrupts(serial_device_t *dev, int interrupts)
static __maybe_unused char serial_get_modem_status(serial_device_t *dev)
@ INTERRUPT_DATA_AVAILABLE
@ OFFSET_DLAB_DIVISOR_LSB
@ OFFSET_INTERRUPT_ENABLE
@ OFFSET_DLAB_DIVISOR_MSB
serial_baudrate_t baudrate_divisor
serial_charlength_t char_length
const serial_driver_t * driver
serial_stopbits_t stop_bits
u8(* read_data)(serial_device_t *dev)
void(* write_register)(serial_device_t *dev, serial_register_t offset, u8 value)
u8(* read_register)(serial_device_t *dev, serial_register_t offset)
void(* write_data)(serial_device_t *dev, u8 data)