aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2017-02-24 12:28:49 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2017-02-24 12:28:49 +0000
commit552a01b5d971111bb52d66e87d63ba5f0e607aed (patch)
treeb2427952fc993acb39df6a016bb225938b81ae0d /os/hal
parent3c720a33274170db6e6c99a612a936bb2e094484 (diff)
downloadChibiOS-552a01b5d971111bb52d66e87d63ba5f0e607aed.tar.gz
ChibiOS-552a01b5d971111bb52d66e87d63ba5f0e607aed.tar.bz2
ChibiOS-552a01b5d971111bb52d66e87d63ba5f0e607aed.zip
Renamed canReceive() and canTransmit() by adding the Timeout postfix for consistency. Old names still are available as macros and deprecated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10112 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/include/hal_can.h36
-rw-r--r--os/hal/src/hal_can.c20
2 files changed, 36 insertions, 20 deletions
diff --git a/os/hal/include/hal_can.h b/os/hal/include/hal_can.h
index 7a94827fd..e91d8bd8b 100644
--- a/os/hal/include/hal_can.h
+++ b/os/hal/include/hal_can.h
@@ -114,6 +114,22 @@ typedef enum {
* @brief Converts a mailbox index to a bit mask.
*/
#define CAN_MAILBOX_TO_MASK(mbx) (1U << ((mbx) - 1U))
+
+/**
+ * @brief Legacy name for @p canTransmitTimeout().
+ *
+ * @deprecated
+ */
+#define canTransmit(canp, mailbox, ctfp, timeout) \
+ canTransmitTimeout(canp, mailbox, ctfp, timeout)
+
+/**
+ * @brief Legacy name for @p canReceiveTimeout().
+ *
+ * @deprecated
+ */
+#define canReceive(canp, mailbox, crfp, timeout) \
+ canReceiveTimeout(canp, mailbox, crfp, timeout)
/** @} */
/*===========================================================================*/
@@ -131,16 +147,16 @@ extern "C" {
canmbx_t mailbox,
const CANTxFrame *ctfp);
bool canTryReceiveI(CANDriver *canp,
- canmbx_t mailbox,
- CANRxFrame *crfp);
- msg_t canTransmit(CANDriver *canp,
- canmbx_t mailbox,
- const CANTxFrame *ctfp,
- systime_t timeout);
- msg_t canReceive(CANDriver *canp,
- canmbx_t mailbox,
- CANRxFrame *crfp,
- systime_t timeout);
+ canmbx_t mailbox,
+ CANRxFrame *crfp);
+ msg_t canTransmitTimeout(CANDriver *canp,
+ canmbx_t mailbox,
+ const CANTxFrame *ctfp,
+ systime_t timeout);
+ msg_t canReceiveTimeout(CANDriver *canp,
+ canmbx_t mailbox,
+ CANRxFrame *crfp,
+ systime_t timeout);
#if CAN_USE_SLEEP_MODE
void canSleep(CANDriver *canp);
void canWakeup(CANDriver *canp);
diff --git a/os/hal/src/hal_can.c b/os/hal/src/hal_can.c
index 08cf7cc5e..014d59c70 100644
--- a/os/hal/src/hal_can.c
+++ b/os/hal/src/hal_can.c
@@ -189,8 +189,8 @@ bool canTryTransmitI(CANDriver *canp,
* @iclass
*/
bool canTryReceiveI(CANDriver *canp,
- canmbx_t mailbox,
- CANRxFrame *crfp) {
+ canmbx_t mailbox,
+ CANRxFrame *crfp) {
osalDbgCheckClassI();
osalDbgCheck((canp != NULL) && (crfp != NULL) &&
@@ -230,10 +230,10 @@ bool canTryReceiveI(CANDriver *canp,
*
* @api
*/
-msg_t canTransmit(CANDriver *canp,
- canmbx_t mailbox,
- const CANTxFrame *ctfp,
- systime_t timeout) {
+msg_t canTransmitTimeout(CANDriver *canp,
+ canmbx_t mailbox,
+ const CANTxFrame *ctfp,
+ systime_t timeout) {
osalDbgCheck((canp != NULL) && (ctfp != NULL) &&
(mailbox <= (canmbx_t)CAN_TX_MAILBOXES));
@@ -278,10 +278,10 @@ msg_t canTransmit(CANDriver *canp,
*
* @api
*/
-msg_t canReceive(CANDriver *canp,
- canmbx_t mailbox,
- CANRxFrame *crfp,
- systime_t timeout) {
+msg_t canReceiveTimeout(CANDriver *canp,
+ canmbx_t mailbox,
+ CANRxFrame *crfp,
+ systime_t timeout) {
osalDbgCheck((canp != NULL) && (crfp != NULL) &&
(mailbox <= (canmbx_t)CAN_RX_MAILBOXES));