You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2022/01/22 17:34:44 UTC
[incubator-nuttx] 02/02: include/nuttx/can.h: rename CAN_ERR_CTRL to CAN_ERR_CRTL for compatibility with libcanutils
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 4c2dd3924a040791df75265388459f67f1846466
Author: raiden00pl <ra...@railab.me>
AuthorDate: Sat Jan 22 17:19:54 2022 +0100
include/nuttx/can.h: rename CAN_ERR_CTRL to CAN_ERR_CRTL for compatibility with libcanutils
---
arch/arm/src/stm32/stm32_can_sock.c | 8 ++++----
include/nuttx/can.h | 16 ++++++++--------
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/arch/arm/src/stm32/stm32_can_sock.c b/arch/arm/src/stm32/stm32_can_sock.c
index c04505a..ff13b54 100644
--- a/arch/arm/src/stm32/stm32_can_sock.c
+++ b/arch/arm/src/stm32/stm32_can_sock.c
@@ -1572,16 +1572,16 @@ static void stm32can_sceinterrupt_work(FAR void *arg)
{
/* Error warning flag */
- data[1] |= (CAN_ERR_CTRL_RX_WARNING | CAN_ERR_CTRL_TX_WARNING);
- errbits |= CAN_ERR_CTRL;
+ data[1] |= (CAN_ERR_CRTL_RX_WARNING | CAN_ERR_CRTL_TX_WARNING);
+ errbits |= CAN_ERR_CRTL;
}
if (regval & CAN_ESR_EPVF)
{
/* Error passive flag */
- data[1] |= (CAN_ERR_CTRL_RX_PASSIVE | CAN_ERR_CTRL_TX_PASSIVE);
- errbits |= CAN_ERR_CTRL;
+ data[1] |= (CAN_ERR_CRTL_RX_PASSIVE | CAN_ERR_CRTL_TX_PASSIVE);
+ errbits |= CAN_ERR_CRTL;
}
if (regval & CAN_ESR_BOFF)
diff --git a/include/nuttx/can.h b/include/nuttx/can.h
index f7c81ff..86602b2 100644
--- a/include/nuttx/can.h
+++ b/include/nuttx/can.h
@@ -214,7 +214,7 @@
#define CAN_ERR_TXTIMEOUT (1 << 0) /* Bit 0: TX timeout */
#define CAN_ERR_LOSTARB (1 << 1) /* Bit 1: Lost arbitration (See CAN_ERR_LOSTARB_* definitions) */
-#define CAN_ERR_CTRL (1 << 2) /* Bit 2: Controller error (See CAN_ERR_CTRL_* definitions) */
+#define CAN_ERR_CRTL (1 << 2) /* Bit 2: Controller error (See CAN_ERR_CRTL_* definitions) */
#define CAN_ERR_PROT (1 << 3) /* Bit 3: Protocol error (see CAN_ERR_PROT_* definitions) */
#define CAN_ERR_TRX (1 << 4) /* Bit 4: Transceiver error (See CAN_TRX_* definitions) */
#define CAN_ERR_ACK (1 << 5) /* Bit 5: No ACK received on transmission */
@@ -235,13 +235,13 @@
/* Data[1]: Error status of CAN-controller */
-#define CAN_ERR_CTRL_UNSPEC 0x00 /* Unspecified error */
-#define CAN_ERR_CTRL_RX_OVERFLOW (1 << 0) /* Bit 0: RX buffer overflow */
-#define CAN_ERR_CTRL_TX_OVERFLOW (1 << 1) /* Bit 1: TX buffer overflow */
-#define CAN_ERR_CTRL_RX_WARNING (1 << 2) /* Bit 2: Reached warning level for RX errors */
-#define CAN_ERR_CTRL_TX_WARNING (1 << 3) /* Bit 3: Reached warning level for TX errors */
-#define CAN_ERR_CTRL_RX_PASSIVE (1 << 4) /* Bit 4: Reached passive level for RX errors */
-#define CAN_ERR_CTRL_TX_PASSIVE (1 << 5) /* Bit 5: Reached passive level for TX errors */
+#define CAN_ERR_CRTL_UNSPEC 0x00 /* Unspecified error */
+#define CAN_ERR_CRTL_RX_OVERFLOW (1 << 0) /* Bit 0: RX buffer overflow */
+#define CAN_ERR_CRTL_TX_OVERFLOW (1 << 1) /* Bit 1: TX buffer overflow */
+#define CAN_ERR_CRTL_RX_WARNING (1 << 2) /* Bit 2: Reached warning level for RX errors */
+#define CAN_ERR_CRTL_TX_WARNING (1 << 3) /* Bit 3: Reached warning level for TX errors */
+#define CAN_ERR_CRTL_RX_PASSIVE (1 << 4) /* Bit 4: Reached passive level for RX errors */
+#define CAN_ERR_CRTL_TX_PASSIVE (1 << 5) /* Bit 5: Reached passive level for TX errors */
/* Data[2]: Error in CAN protocol. This provides the type of the error. */