From 552a01b5d971111bb52d66e87d63ba5f0e607aed Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 24 Feb 2017 12:28:49 +0000 Subject: 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 --- os/hal/include/hal_can.h | 36 ++++++++++++++++++++++++++---------- os/hal/src/hal_can.c | 20 ++++++++++---------- 2 files changed, 36 insertions(+), 20 deletions(-) (limited to 'os/hal') 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)); -- cgit v1.2.3