Go to the documentation of this file.
36 #ifndef HAL_CHANNELS_H
37 #define HAL_CHANNELS_H
43 #define CHN_CTL_INVALID 0
45 #define CHN_CTL_TX_WAIT 2
51 #define _base_channel_methods \
52 _base_sequential_stream_methods \
54 msg_t (*putt)(void *instance, uint8_t b, sysinterval_t time); \
56 msg_t (*gett)(void *instance, sysinterval_t time); \
58 size_t (*writet)(void *instance, const uint8_t *bp, \
59 size_t n, sysinterval_t time); \
61 size_t (*readt)(void *instance, uint8_t *bp, size_t n, \
62 sysinterval_t time); \
64 msg_t (*ctl)(void *instance, unsigned int operation, void *arg);
71 #define _base_channel_data \
72 _base_sequential_stream_data
119 #define chnPutTimeout(ip, b, time) ((ip)->vmt->putt(ip, b, time))
139 #define chnGetTimeout(ip, time) ((ip)->vmt->gett(ip, time))
154 #define chnWrite(ip, bp, n) streamWrite(ip, bp, n)
173 #define chnWriteTimeout(ip, bp, n, time) ((ip)->vmt->writet(ip, bp, n, time))
188 #define chnRead(ip, bp, n) streamRead(ip, bp, n)
207 #define chnReadTimeout(ip, bp, n, time) ((ip)->vmt->readt(ip, bp, n, time))
223 #define chnControl(ip, operation, arg) ((ip)->vmt->ctl(ip, operation, arg))
231 #define CHN_NO_ERROR (eventflags_t)0
233 #define CHN_CONNECTED (eventflags_t)1
235 #define CHN_DISCONNECTED (eventflags_t)2
237 #define CHN_INPUT_AVAILABLE (eventflags_t)4
239 #define CHN_OUTPUT_EMPTY (eventflags_t)8
241 #define CHN_TRANSMISSION_END (eventflags_t)16
247 #define _base_asynchronous_channel_methods \
248 _base_channel_methods \
253 #define _base_asynchronous_channel_data \
256 event_source_t event;
294 #define chnGetEventSource(ip) (&((ip)->event))
308 #define chnAddFlagsI(ip, flags) { \
309 osalEventBroadcastFlagsI(&(ip)->event, flags); \
Base asynchronous channel class.
BaseChannel virtual methods table.
#define _base_channel_data
BaseChannel specific data.
#define _base_asynchronous_channel_methods
BaseAsynchronousChannel specific methods.
#define _base_asynchronous_channel_data
BaseAsynchronousChannel specific data.
const struct BaseChannelVMT * vmt
Virtual Methods Table.
BaseAsynchronousChannel virtual methods table.
const struct BaseAsynchronousChannelVMT * vmt
Virtual Methods Table.
#define _base_channel_methods
BaseChannel specific methods.