28 #if (HAL_USE_SERIAL == TRUE) || defined(__DOXYGEN__) 38 #define SD_PARITY_ERROR (eventflags_t)32 39 #define SD_FRAMING_ERROR (eventflags_t)64 40 #define SD_OVERRUN_ERROR (eventflags_t)128 41 #define SD_NOISE_ERROR (eventflags_t)256 42 #define SD_BREAK_DETECTED (eventflags_t)512 43 #define SD_QUEUE_FULL_ERROR (eventflags_t)1024 59 #if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) 60 #define SERIAL_DEFAULT_BITRATE 38400 72 #if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) 73 #define SERIAL_BUFFERS_SIZE 16 104 #define _serial_driver_methods \ 105 _base_asynchronous_channel_methods 145 #define sdPutI(sdp, b) oqPutI(&(sdp)->oqueue, b) 155 #define sdPut(sdp, b) oqPut(&(sdp)->oqueue, b) 165 #define sdPutTimeout(sdp, b, t) oqPutTimeout(&(sdp)->oqueue, b, t) 175 #define sdGetI(sdp) iqGetI(&(sdp)->iqueue) 185 #define sdGet(sdp) iqGet(&(sdp)->iqueue) 195 #define sdGetTimeout(sdp, t) iqGetTimeout(&(sdp)->iqueue, t) 205 #define sdWriteI(sdp, b, n) oqWriteI(&(sdp)->oqueue, b, n) 215 #define sdWrite(sdp, b, n) oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_INFINITE) 226 #define sdWriteTimeout(sdp, b, n, t) \ 227 oqWriteTimeout(&(sdp)->oqueue, b, n, t) 237 #define sdAsynchronousWrite(sdp, b, n) \ 238 oqWriteTimeout(&(sdp)->oqueue, b, n, TIME_IMMEDIATE) 248 #define sdReadI(sdp, b, n) iqReadI(&(sdp)->iqueue, b, n, TIME_INFINITE) 258 #define sdRead(sdp, b, n) iqReadTimeout(&(sdp)->iqueue, b, n, TIME_INFINITE) 269 #define sdReadTimeout(sdp, b, n, t) iqReadTimeout(&(sdp)->iqueue, b, n, t) 279 #define sdAsynchronousRead(sdp, b, n) \ 280 iqReadTimeout(&(sdp)->iqueue, b, n, TIME_IMMEDIATE) 291 #if !defined(SERIAL_ADVANCED_BUFFERING_SUPPORT) || \ 292 (SERIAL_ADVANCED_BUFFERING_SUPPORT == FALSE) void sdStart(SerialDriver *sdp, const SerialConfig *config)
Configures and starts the driver.
PLATFORM serial subsystem low level driver header.
void sdInit(void)
Serial Driver initialization.
bool sdPutWouldBlock(SerialDriver *sdp)
Direct output check on a SerialDriver.
sdstate_t
Driver state machine possible states.
msg_t sdRequestDataI(SerialDriver *sdp)
Handles outgoing data.
#define _serial_driver_methods
SerialDriver specific methods.
int32_t msg_t
Type of a message.
void(* qnotify_t)(io_queue_t *qp)
Queue notification callback type.
const struct SerialDriverVMT * vmt
Virtual Methods Table.
Full duplex serial driver class.
SerialDriver virtual methods table.
msg_t sdControl(SerialDriver *sdp, unsigned int operation, void *arg)
Control operation on a serial port.
void sdObjectInit(SerialDriver *sdp, qnotify_t inotify, qnotify_t onotify)
Initializes a generic full duplex driver object.
bool sdGetWouldBlock(SerialDriver *sdp)
Direct input check on a SerialDriver.
void sdIncomingDataI(SerialDriver *sdp, uint8_t b)
Handles incoming data.
#define _serial_driver_data
SerialDriver specific data.
PLATFORM Serial Driver configuration structure.
void sdStop(SerialDriver *sdp)
Stops the driver.