I/O Device Driver Interface

The header file <cyg/io/ccb_devio.h> defines the interface between the common CCB support and the target specific device drivers. The device drivers provide the physical CCB packet communication support.

Physical connections are supplied to the common layer via the relevant target/platform defining a cyg_ccb_port_instance_t structure (via the CCB_PORT() macro), which provides the mapping to the relevant low-level hardware I/O driver via the supplied named device.

The cyg_ccb_devio_port_t structure defines a hardware port instance (i.e. a physical RS-485 hardware interface) driver in conjunction with a standard I/O driver device descriptor DEVTAB_ENTRY() definition. A driver normally instantiates itself via the CCB_DEVIO_PORT() macro to populate a cyg_ccb_devio_port_t structure.

The device drivers interface with the CCB common layer via the cyg_ccb_devio_funs_t and cyg_ccb_callbacks_t structures implemented by the src/ccb_devio.c support.

The device drivers fundamentally provide a per-port blocking transmit function, and asynchronous packet reception. The driver calls back into the common CCB layer via the (DSR context) cyg_ccb_callbacks_t functions tx_done() and rx_pkt().

2017-02-09
Documentation license for this page: eCosPro License