git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1545 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
41a4ecfc80
commit
a66602c99d
|
@ -126,7 +126,7 @@ struct _SerialDriver {
|
|||
* Virtual Methods Table.
|
||||
*/
|
||||
const struct SerialDriverVMT *vmt;
|
||||
_serial_driver_data;
|
||||
_serial_driver_data
|
||||
};
|
||||
|
||||
/*===========================================================================*/
|
||||
|
|
|
@ -121,7 +121,7 @@ typedef struct {
|
|||
uint8_t ob[SERIAL_BUFFERS_SIZE]; \
|
||||
/* End of the mandatory fields.*/ \
|
||||
/* Pointer to the USART registers block.*/ \
|
||||
AT91PS_USART usart
|
||||
AT91PS_USART usart;
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver macros. */
|
||||
|
|
|
@ -142,7 +142,7 @@ typedef struct {
|
|||
uint8_t ob[SERIAL_BUFFERS_SIZE]; \
|
||||
/* End of the mandatory fields.*/ \
|
||||
/* Pointer to the USART registers block.*/ \
|
||||
UART *uart
|
||||
UART *uart;
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver macros. */
|
||||
|
|
|
@ -130,7 +130,7 @@ typedef struct {
|
|||
/* Data socket for simulated serial port.*/ \
|
||||
SOCKET com_data; \
|
||||
/* Port readable name.*/ \
|
||||
const char *com_name
|
||||
const char *com_name;
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver macros. */
|
||||
|
|
|
@ -190,7 +190,7 @@ typedef struct {
|
|||
uint8_t ob[SERIAL_BUFFERS_SIZE]; \
|
||||
/* End of the mandatory fields.*/ \
|
||||
/* Pointer to the USART registers block.*/ \
|
||||
USART_TypeDef *usart
|
||||
USART_TypeDef *usart;
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver macros. */
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct {
|
|||
/* Data socket for simulated serial port.*/ \
|
||||
SOCKET com_data; \
|
||||
/* Port readable name.*/ \
|
||||
const char *com_name
|
||||
const char *com_name;
|
||||
|
||||
/*===========================================================================*/
|
||||
/* External declarations. */
|
||||
|
|
|
@ -212,10 +212,11 @@ void sdIncomingDataI(SerialDriver *sdp, uint8_t b) {
|
|||
* the interrupt source when this happens).
|
||||
*/
|
||||
msg_t sdRequestDataI(SerialDriver *sdp) {
|
||||
msg_t b;
|
||||
|
||||
chDbgCheck(sdp != NULL, "sdRequestDataI");
|
||||
|
||||
msg_t b = chOQGetI(&sdp->oqueue);
|
||||
b = chOQGetI(&sdp->oqueue);
|
||||
if (b < Q_OK)
|
||||
chEvtBroadcastI(&sdp->oevent);
|
||||
return b;
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef struct {
|
|||
* @brief @p SerialDriver specific data.
|
||||
*/
|
||||
#define _serial_driver_data \
|
||||
_base_asynchronous_channel_data; \
|
||||
_base_asynchronous_channel_data \
|
||||
/* Driver state.*/ \
|
||||
sdstate_t state; \
|
||||
/* Current configuration data.*/ \
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* @brief @p BaseChannel specific methods.
|
||||
*/
|
||||
#define _base_channel_methods \
|
||||
_base_sequental_stream_methods; \
|
||||
_base_sequental_stream_methods \
|
||||
/* Channel output check.*/ \
|
||||
bool_t (*putwouldblock)(void *instance); \
|
||||
/* Channel input check.*/ \
|
||||
|
@ -44,7 +44,7 @@
|
|||
size_t (*writet)(void *instance, const uint8_t *bp, \
|
||||
size_t n, systime_t time); \
|
||||
/* Channel read method with timeout specification.*/ \
|
||||
size_t (*readt)(void *instance, uint8_t *bp, size_t n, systime_t time)
|
||||
size_t (*readt)(void *instance, uint8_t *bp, size_t n, systime_t time);
|
||||
|
||||
/**
|
||||
* @brief @p BaseChannel specific data.
|
||||
|
@ -58,7 +58,7 @@
|
|||
* @brief @p BaseChannel virtual methods table.
|
||||
*/
|
||||
struct BaseChannelVMT { \
|
||||
_base_channel_methods; \
|
||||
_base_channel_methods \
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -73,7 +73,7 @@ typedef struct {
|
|||
* Virtual Methods Table.
|
||||
*/
|
||||
const struct BaseChannelVMT *vmt;
|
||||
_base_channel_data;
|
||||
_base_channel_data
|
||||
} BaseChannel;
|
||||
|
||||
/**
|
||||
|
@ -209,17 +209,17 @@ typedef struct {
|
|||
* @brief @p BaseAsynchronousChannel specific data.
|
||||
*/
|
||||
#define _base_asynchronous_channel_data \
|
||||
_base_channel_data; \
|
||||
_base_channel_data \
|
||||
/* Data Available EventSource.*/ \
|
||||
EventSource ievent; \
|
||||
/* Data Transmitted EventSource.*/ \
|
||||
EventSource oevent
|
||||
EventSource oevent;
|
||||
|
||||
/**
|
||||
* @brief @p BaseAsynchronousChannel virtual methods table.
|
||||
*/
|
||||
struct BaseAsynchronousChannelVMT {
|
||||
_base_asynchronous_channel_methods;
|
||||
_base_asynchronous_channel_methods
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -234,7 +234,7 @@ typedef struct {
|
|||
* Virtual Methods Table.
|
||||
*/
|
||||
const struct BaseAsynchronousChannelVMT *vmt;
|
||||
_base_asynchronous_channel_data;
|
||||
_base_asynchronous_channel_data
|
||||
} BaseAsynchronousChannel;
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
/* Stream write buffer method.*/ \
|
||||
size_t (*write)(void *instance, const uint8_t *bp, size_t n); \
|
||||
/* Stream read buffer method.*/ \
|
||||
size_t (*read)(void *instance, uint8_t *bp, size_t n)
|
||||
size_t (*read)(void *instance, uint8_t *bp, size_t n);
|
||||
|
||||
/**
|
||||
* @brief @p BaseSequentialStream specific data.
|
||||
|
@ -47,7 +47,7 @@
|
|||
* @brief @p BaseSequentialStream virtual methods table.
|
||||
*/
|
||||
struct BaseSequentialStreamVMT {
|
||||
_base_sequental_stream_methods;
|
||||
_base_sequental_stream_methods
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -60,7 +60,7 @@ typedef struct {
|
|||
* Virtual Methods Table.
|
||||
*/
|
||||
const struct BaseSequentialStreamVMT *vmt;
|
||||
_base_sequental_stream_data;
|
||||
_base_sequental_stream_data
|
||||
} BaseSequentialStream;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue