The called device will return the number of characters accepted; i.e. 1 on success and 0 if it could not handle the new byte. If the receiver returns 0, it must later call receive_ready() in the sender's interface to signal that new bytes can be accepted. A serial device should handle the case where the receive_ready() function is called although it has no more bytes to send.
#define TTY_ABORT 0x100 typedef struct { int (*write)(conf_object_t *obj, int value); void (*receive_ready)(conf_object_t *obj); } serial_device_interface_t; #define SERIAL_DEVICE_INTERFACE "serial-device"