aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/Win32/serial_lld.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-01-02 13:35:55 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-01-02 13:35:55 +0000
commitbedb87c1e7cc9741c57c299d81d6e24c5e9c59c5 (patch)
tree7a3f0b05365b525bd9335b9a660aa80b6b6975b3 /os/hal/platforms/Win32/serial_lld.h
parent15e6fecf11e470abebe963177434f83883e63acf (diff)
downloadChibiOS-bedb87c1e7cc9741c57c299d81d6e24c5e9c59c5.tar.gz
ChibiOS-bedb87c1e7cc9741c57c299d81d6e24c5e9c59c5.tar.bz2
ChibiOS-bedb87c1e7cc9741c57c299d81d6e24c5e9c59c5.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1495 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/Win32/serial_lld.h')
-rw-r--r--os/hal/platforms/Win32/serial_lld.h71
1 files changed, 40 insertions, 31 deletions
diff --git a/os/hal/platforms/Win32/serial_lld.h b/os/hal/platforms/Win32/serial_lld.h
index 4690fcb60..ed70a880a 100644
--- a/os/hal/platforms/Win32/serial_lld.h
+++ b/os/hal/platforms/Win32/serial_lld.h
@@ -88,62 +88,71 @@
typedef uint32_t sdflags_t;
/**
+ * @brief Generic Serial Driver configuration structure.
+ * @details An instance of this structure must be passed to @p sdStart()
+ * in order to configure and start a serial driver operations.
+ *
+ * @note This structure content is architecture dependent, each driver
+ * implementation defines its own version and the custom static
+ * initializers.
+ */
+typedef struct {
+} SerialConfig;
+
+/**
* @brief @p SerialDriver specific data.
*/
struct _serial_driver_data {
/**
- * Input queue, incoming data can be read from this input queue by
- * using the queues APIs.
+ * @brief Driver state.
+ */
+ sdstate_t state;
+ /**
+ * @brief Current configuration data.
*/
- InputQueue iqueue;
+ const SerialConfig *config;
/**
- * Output queue, outgoing data can be written to this output queue by
- * using the queues APIs.
+ * @brief Input queue, incoming data can be read from this input queue by
+ * using the queues APIs.
*/
- OutputQueue oqueue;
+ InputQueue iqueue;
/**
- * Status Change @p EventSource. This event is generated when one or more
- * condition flags change.
+ * @brief Output queue, outgoing data can be written to this output queue by
+ * using the queues APIs.
*/
- EventSource sevent;
+ OutputQueue oqueue;
/**
- * I/O driver status flags.
+ * @brief Status Change @p EventSource. This event is generated when one or
+ * more condition flags change.
*/
- sdflags_t flags;
+ EventSource sevent;
/**
- * Input circular buffer.
+ * @brief I/O driver status flags.
*/
- uint8_t ib[SERIAL_BUFFERS_SIZE];
+ sdflags_t flags;
/**
- * Output circular buffer.
+ * @brief Input circular buffer.
*/
- uint8_t ob[SERIAL_BUFFERS_SIZE];
+ uint8_t ib[SERIAL_BUFFERS_SIZE];
+ /**
+ * @brief Output circular buffer.
+ */
+ uint8_t ob[SERIAL_BUFFERS_SIZE];
+ /* End of the mandatory fields.*/
/**
* Listen socket for simulated serial port.
*/
- SOCKET com_listen;
+ SOCKET com_listen;
/**
* Data socket for simulated serial port.
*/
- SOCKET com_data;
+ SOCKET com_data;
/**
* Port readable name.
*/
- const char *com_name;
+ const char *com_name;
};
-/**
- * @brief Generic Serial Driver configuration structure.
- * @details An instance of this structure must be passed to @p sdStart()
- * in order to configure and start a serial driver operations.
- *
- * @note This structure content is architecture dependent, each driver
- * implementation defines its own version and the custom static
- * initializers.
- */
-typedef struct {
-} SerialDriverConfig;
-
/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
@@ -160,7 +169,7 @@ extern SerialDriver SD2;
extern "C" {
#endif
void sd_lld_init(void);
- void sd_lld_start(SerialDriver *sdp, const SerialDriverConfig *config);
+ void sd_lld_start(SerialDriver *sdp);
void sd_lld_stop(SerialDriver *sdp);
bool_t sd_lld_interrupt_pending(void);
#ifdef __cplusplus