From 4c2dd3924a040791df75265388459f67f1846466 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 22 Jan 2022 17:19:54 +0100 Subject: [PATCH] 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 c04505ab4f..ff13b54297 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 f7c81ffb5b..86602b248a 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. */