diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-30 21:34:05 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-11-30 21:34:05 +0000 |
commit | 8a433087afe80e92aea1c558965994b53bfcfb48 (patch) | |
tree | 6d57405dddc07daa8ef7995d8898dbd7256a5258 /os/hal/templates | |
parent | 770c4873d20623f6d4f678d62b67eb6218e259bf (diff) | |
download | ChibiOS-8a433087afe80e92aea1c558965994b53bfcfb48.tar.gz ChibiOS-8a433087afe80e92aea1c558965994b53bfcfb48.tar.bz2 ChibiOS-8a433087afe80e92aea1c558965994b53bfcfb48.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1368 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/templates')
-rw-r--r-- | os/hal/templates/can_lld.h | 39 |
1 files changed, 26 insertions, 13 deletions
diff --git a/os/hal/templates/can_lld.h b/os/hal/templates/can_lld.h index 202f7e044..14588c0d5 100644 --- a/os/hal/templates/can_lld.h +++ b/os/hal/templates/can_lld.h @@ -61,6 +61,11 @@ /*===========================================================================*/
/**
+ * @brief CAN status flags.
+ */
+typedef uint32_t canstatus_t;
+
+/**
* @brief CAN frame.
* @note Accessing the frame data as word16 or word32 is not portable because
* machine data endianness, it can be still useful for a quick filling. @@ -91,36 +96,44 @@ typedef struct { /**
* @brief Driver state.
*/
- canstate_t can_state;
+ canstate_t cd_state;
/**
* @brief Current configuration data.
*/
- const CANConfig *can_config;
+ const CANConfig *cd_config;
/**
- * @brief Transmission queue semaphore. + * @brief Transmission queue semaphore.
*/
- Semaphore can_txsem;
+ Semaphore cd_txsem;
/**
* @brief Receive queue semaphore.
*/
- Semaphore can_rxsem;
+ Semaphore cd_rxsem;
+ /**
+ * @brief One or more frames become available.
+ */
+ EventSource cd_rxfull_event;
+ /**
+ * @brief One or more transmission slots become available.
+ */
+ EventSource cd_txempty_event;
/**
- * @brief One or more frames become available. + * @brief A CAN bus error happened.
*/
- EventSource can_rxfull_event;
+ EventSource cd_error_event;
/**
- * @brief One or more transmission slots become available. + * @brief Error flags set when an error event is broadcasted.
*/
- EventSource can_txempty_event;
+ canstatus_t cd_status;
#if CAN_USE_SLEEP_MODE || defined (__DOXYGEN__)
/**
- * @brief Entering sleep state event. + * @brief Entering sleep state event.
*/
- EventSource can_sleep_event;
+ EventSource cd_sleep_event;
/**
- * @brief Exiting sleep state event. + * @brief Exiting sleep state event.
*/
- EventSource can_wakeup_event;
+ EventSource cd_wakeup_event;
#endif /* CAN_USE_SLEEP_MODE */
/* End of the mandatory fields.*/
} CANDriver;
|