ChibiOS/HAL  6.1.0
hal_channels.h File Reference

I/O channels access. More...

Go to the source code of this file.

Data Structures

struct  BaseChannelVMT
 BaseChannel virtual methods table. More...
 
struct  BaseChannel
 Base channel class. More...
 
struct  BaseAsynchronousChannelVMT
 BaseAsynchronousChannel virtual methods table. More...
 
struct  BaseAsynchronousChannel
 Base asynchronous channel class. More...
 

Macros

#define _base_channel_methods
 BaseChannel specific methods. More...
 
#define _base_channel_data   _base_sequential_stream_data
 BaseChannel specific data. More...
 
#define _base_asynchronous_channel_methods   _base_channel_methods \
 BaseAsynchronousChannel specific methods. More...
 
#define _base_asynchronous_channel_data
 BaseAsynchronousChannel specific data. More...
 
Default control operation codes.
#define CHN_CTL_INVALID   0 /** @brief Invalid operation code. */
 
#define CHN_CTL_NOP   1 /** @brief Does nothing. */
 
#define CHN_CTL_TX_WAIT   2 /** @brief Wait for TX completion. */
 
Macro Functions (BaseChannel)
#define chnPutTimeout(ip, b, time)   ((ip)->vmt->putt(ip, b, time))
 Channel blocking byte write with timeout. More...
 
#define chnGetTimeout(ip, time)   ((ip)->vmt->gett(ip, time))
 Channel blocking byte read with timeout. More...
 
#define chnWrite(ip, bp, n)   streamWrite(ip, bp, n)
 Channel blocking write. More...
 
#define chnWriteTimeout(ip, bp, n, time)   ((ip)->vmt->writet(ip, bp, n, time))
 Channel blocking write with timeout. More...
 
#define chnRead(ip, bp, n)   streamRead(ip, bp, n)
 Channel blocking read. More...
 
#define chnReadTimeout(ip, bp, n, time)   ((ip)->vmt->readt(ip, bp, n, time))
 Channel blocking read with timeout. More...
 
#define chnControl(ip, operation, arg)   ((ip)->vmt->ctl(ip, operation, arg))
 Control operation on a channel. More...
 
I/O status flags added to the event listener
#define CHN_NO_ERROR   (eventflags_t)0
 No pending conditions. More...
 
#define CHN_CONNECTED   (eventflags_t)1
 Connection happened. More...
 
#define CHN_DISCONNECTED   (eventflags_t)2
 Disconnection happened. More...
 
#define CHN_INPUT_AVAILABLE   (eventflags_t)4
 Data available in the input queue. More...
 
#define CHN_OUTPUT_EMPTY   (eventflags_t)8
 Output queue empty. More...
 
#define CHN_TRANSMISSION_END   (eventflags_t)16
 Transmission end. More...
 
Macro Functions (BaseAsynchronousChannel)
#define chnGetEventSource(ip)   (&((ip)->event))
 Returns the I/O condition event source. More...
 
#define chnAddFlagsI(ip, flags)
 Adds status flags to the listeners's flags mask. More...
 

Detailed Description

I/O channels access.

This header defines an abstract interface useful to access generic I/O serial devices in a standardized way.

Definition in file hal_channels.h.