uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CAN Private Macros

Macros

#define CAN_MOD_RM   ((uint32_t)(1))
 
#define CAN_MOD_LOM   ((uint32_t)(1<<1))
 
#define CAN_MOD_STM   ((uint32_t)(1<<2))
 
#define CAN_MOD_TPM   ((uint32_t)(1<<3))
 
#define CAN_MOD_SM   ((uint32_t)(1<<4))
 
#define CAN_MOD_RPM   ((uint32_t)(1<<5))
 
#define CAN_MOD_TM   ((uint32_t)(1<<7))
 
#define CAN_CMR_TR   ((uint32_t)(1))
 
#define CAN_CMR_AT   ((uint32_t)(1<<1))
 
#define CAN_CMR_RRB   ((uint32_t)(1<<2))
 
#define CAN_CMR_CDO   ((uint32_t)(1<<3))
 
#define CAN_CMR_SRR   ((uint32_t)(1<<4))
 
#define CAN_CMR_STB1   ((uint32_t)(1<<5))
 
#define CAN_CMR_STB2   ((uint32_t)(1<<6))
 
#define CAN_CMR_STB3   ((uint32_t)(1<<7))
 
#define CAN_GSR_RBS   ((uint32_t)(1))
 
#define CAN_GSR_DOS   ((uint32_t)(1<<1))
 
#define CAN_GSR_TBS   ((uint32_t)(1<<2))
 
#define CAN_GSR_TCS   ((uint32_t)(1<<3))
 
#define CAN_GSR_RS   ((uint32_t)(1<<4))
 
#define CAN_GSR_TS   ((uint32_t)(1<<5))
 
#define CAN_GSR_ES   ((uint32_t)(1<<6))
 
#define CAN_GSR_BS   ((uint32_t)(1<<7))
 
#define CAN_GSR_RXERR(n)   ((uint32_t)((n&0xFF)<<16))
 
#define CAN_GSR_TXERR(n)   ((uint32_t)(n&0xFF)<<24))
 
#define CAN_ICR_RI   ((uint32_t)(1))
 
#define CAN_ICR_TI1   ((uint32_t)(1<<1))
 
#define CAN_ICR_EI   ((uint32_t)(1<<2))
 
#define CAN_ICR_DOI   ((uint32_t)(1<<3))
 
#define CAN_ICR_WUI   ((uint32_t)(1<<4))
 
#define CAN_ICR_EPI   ((uint32_t)(1<<5))
 
#define CAN_ICR_ALI   ((uint32_t)(1<<6))
 
#define CAN_ICR_BEI   ((uint32_t)(1<<7))
 
#define CAN_ICR_IDI   ((uint32_t)(1<<8))
 
#define CAN_ICR_TI2   ((uint32_t)(1<<9))
 
#define CAN_ICR_TI3   ((uint32_t)(1<<10))
 
#define CAN_ICR_ERRBIT(n)   ((uint32_t)((n&0x1F)<<16))
 
#define CAN_ICR_ERRDIR   ((uint32_t)(1<<21))
 
#define CAN_ICR_ERRC(n)   ((uint32_t)((n&0x3)<<22))
 
#define CAN_ICR_ALCBIT(n)   ((uint32_t)((n&0xFF)<<24))
 
#define CAN_IER_RIE   ((uint32_t)(1))
 
#define CAN_IER_TIE1   ((uint32_t)(1<<1))
 
#define CAN_IER_EIE   ((uint32_t)(1<<2))
 
#define CAN_IER_DOIE   ((uint32_t)(1<<3))
 
#define CAN_IER_WUIE   ((uint32_t)(1<<4))
 
#define CAN_IER_EPIE   ((uint32_t)(1<<5))
 
#define CAN_IER_ALIE   ((uint32_t)(1<<6))
 
#define CAN_IER_BEIE   ((uint32_t)(1<<7))
 
#define CAN_IER_IDIE   ((uint32_t)(1<<8))
 
#define CAN_IER_TIE2   ((uint32_t)(1<<9))
 
#define CAN_IER_TIE3   ((uint32_t)(1<<10))
 
#define CAN_BTR_BRP(n)   ((uint32_t)(n&0x3FF))
 
#define CAN_BTR_SJM(n)   ((uint32_t)((n&0x3)<<14))
 
#define CAN_BTR_TESG1(n)   ((uint32_t)(n&0xF)<<16))
 
#define CAN_BTR_TESG2(n)   ((uint32_t)(n&0xF)<<20))
 
#define CAN_BTR_SAM(n)   ((uint32_t)(1<<23))
 
#define CAN_EWL_EWL(n)   ((uint32_t)(n&0xFF))
 
#define CAN_SR_RBS   ((uint32_t)(1))
 
#define CAN_SR_DOS   ((uint32_t)(1<<1))
 
#define CAN_SR_TBS1   ((uint32_t)(1<<2))
 
#define CAN_SR_TCS1   ((uint32_t)(1<<3))
 
#define CAN_SR_RS   ((uint32_t)(1<<4))
 
#define CAN_SR_TS1   ((uint32_t)(1<<5))
 
#define CAN_SR_ES   ((uint32_t)(1<<6))
 
#define CAN_SR_BS   ((uint32_t)(1<<7))
 
#define CAN_SR_TBS2   ((uint32_t)(1<<10))
 
#define CAN_SR_TCS2   ((uint32_t)(1<<11))
 
#define CAN_SR_TS2   ((uint32_t)(1<<13))
 
#define CAN_SR_TBS3   ((uint32_t)(1<<18))
 
#define CAN_SR_TCS3   ((uint32_t)(1<<19))
 
#define CAN_SR_TS3   ((uint32_t)(1<<21))
 
#define CAN_RFS_ID_INDEX(n)   ((uint32_t)(n&0x3FF))
 
#define CAN_RFS_BP   ((uint32_t)(1<<10))
 
#define CAN_RFS_DLC(n)   ((uint32_t)((n&0xF)<<16)
 
#define CAN_RFS_RTR   ((uint32_t)(1<<30))
 
#define CAN_RFS_FF   ((uint32_t)(1<<31))
 
#define CAN_RID_ID_11(n)   ((uint32_t)(n&0x7FF))
 
#define CAN_RID_ID_29(n)   ((uint32_t)(n&0x1FFFFFFF))
 
#define CAN_RDA_DATA1(n)   ((uint32_t)(n&0xFF))
 
#define CAN_RDA_DATA2(n)   ((uint32_t)((n&0xFF)<<8))
 
#define CAN_RDA_DATA3(n)   ((uint32_t)((n&0xFF)<<16))
 
#define CAN_RDA_DATA4(n)   ((uint32_t)((n&0xFF)<<24))
 
#define CAN_RDB_DATA5(n)   ((uint32_t)(n&0xFF))
 
#define CAN_RDB_DATA6(n)   ((uint32_t)((n&0xFF)<<8))
 
#define CAN_RDB_DATA7(n)   ((uint32_t)((n&0xFF)<<16))
 
#define CAN_RDB_DATA8(n)   ((uint32_t)((n&0xFF)<<24))
 
#define CAN_TFI_PRIO(n)   ((uint32_t)(n&0xFF))
 
#define CAN_TFI_DLC(n)   ((uint32_t)((n&0xF)<<16))
 
#define CAN_TFI_RTR   ((uint32_t)(1<<30))
 
#define CAN_TFI_FF   ((uint32_t)(1<<31))
 
#define CAN_TID_ID11(n)   ((uint32_t)(n&0x7FF))
 
#define CAN_TID_ID29(n)   ((uint32_t)(n&0x1FFFFFFF))
 
#define CAN_TDA_DATA1(n)   ((uint32_t)(n&0xFF))
 
#define CAN_TDA_DATA2(n)   ((uint32_t)((n&0xFF)<<8))
 
#define CAN_TDA_DATA3(n)   ((uint32_t)((n&0xFF)<<16))
 
#define CAN_TDA_DATA4(n)   ((uint32_t)((n&0xFF)<<24))
 
#define CAN_TDA_DATA5(n)   ((uint32_t)(n&0xFF))
 
#define CAN_TDA_DATA6(n)   ((uint32_t)((n&0xFF)<<8))
 
#define CAN_TDA_DATA7(n)   ((uint32_t)((n&0xFF)<<16))
 
#define CAN_TDA_DATA8(n)   ((uint32_t)((n&0xFF)<<24))
 
#define CAN1SLEEPCLR   ((uint32_t)(1<<1))
 
#define CAN2SLEEPCLR   ((uint32_t)(1<<2))
 
#define CAN_WAKEFLAGES_CAN1WAKE   ((uint32_t)(1<<1))
 
#define CAN_WAKEFLAGES_CAN2WAKE   ((uint32_t)(1<<2))
 
#define CAN_TSR_TS1   ((uint32_t)(1))
 
#define CAN_TSR_TS2   ((uint32_t)(1<<1))
 
#define CAN_TSR_TBS1   ((uint32_t)(1<<8))
 
#define CAN_TSR_TBS2   ((uint32_t)(1<<9))
 
#define CAN_TSR_TCS1   ((uint32_t)(1<<16))
 
#define CAN_TSR_TCS2   ((uint32_t)(1<<17))
 
#define CAN_RSR_RS1   ((uint32_t)(1))
 
#define CAN_RSR_RS2   ((uint32_t)(1<<1))
 
#define CAN_RSR_RB1   ((uint32_t)(1<<8))
 
#define CAN_RSR_RB2   ((uint32_t)(1<<9))
 
#define CAN_RSR_DOS1   ((uint32_t)(1<<16))
 
#define CAN_RSR_DOS2   ((uint32_t)(1<<17))
 
#define CAN_MSR_E1   ((uint32_t)(1))
 
#define CAN_MSR_E2   ((uint32_t)(1<<1))
 
#define CAN_MSR_BS1   ((uint32_t)(1<<8))
 
#define CAN_MSR_BS2   ((uint32_t)(1<<9))
 
#define CAN_AFMR_AccOff   ((uint32_t)(1))
 
#define CAN_AFMR_AccBP   ((uint32_t)(1<<1))
 
#define CAN_AFMR_eFCAN   ((uint32_t)(1<<2))
 
#define CAN_STT_sa(n)   ((uint32_t)((n&1FF)<<2))
 
#define CAN_SFF_GRP_sa(n)   ((uint32_t)((n&3FF)<<2))
 
#define CAN_EFF_sa(n)   ((uint32_t)((n&1FF)<<2))
 
#define CAN_Eff_GRP_sa(n)   ((uint32_t)((n&3FF)<<2))
 
#define CAN_EndofTable(n)   ((uint32_t)((n&3FF)<<2))
 
#define CAN_LUTerrAd(n)   ((uint32_t)((n&1FF)<<2))
 
#define CAN_LUTerr   ((uint32_t)(1))
 
#define CAN_FCANIE   ((uint32_t)(1))
 
#define CAN_FCANIC0_IntPnd(n)   ((uint32_t)(1<<n))
 
#define CAN_FCANIC1_IntPnd(n)   ((uint32_t)(1<<(n-32)))
 
#define PARAM_CANx(x)
 
#define PARAM_CANAFx(x)   (((uint32_t*)x)== ((uint32_t*)LPC_CANAF))
 
#define PARAM_CANAFRAMx(x)   (((uint32_t*)x)== (uint32_t*)LPC_CANAF_RAM)
 
#define PARAM_CANCRx(x)   (((uint32_t*)x)==((uint32_t*)LPC_CANCR))
 
#define PARAM_I2S_DATA(data)   ((data>=0)&&(data <= 0xFFFFFFFF))
 
#define PRAM_I2S_FREQ(freq)   ((freq>=16000)&&(freq <= 96000))
 
#define PARAM_ID_11(n)   ((n>>11)==0) /*-- 11 bit --*/
 
#define PARAM_ID_29(n)   ((n>>29)==0) /*-- 29 bit --*/
 
#define PARAM_DLC(n)   ((n>>4)==0) /*-- 4 bit --*/
 
#define PARAM_ID_FORMAT(n)   ((n==STD_ID_FORMAT)||(n==EXT_ID_FORMAT))
 
#define PARAM_GRP_ID(x, y)   ((x<=y))
 
#define PARAM_FRAME_TYPE(n)   ((n==DATA_FRAME)||(n==REMOTE_FRAME))
 
#define PARAM_CTRL_STS_TYPE(n)
 
#define PARAM_CR_STS_TYPE(n)
 
#define PARAM_AFMODE_TYPE(n)
 
#define PARAM_MODE_TYPE(n)
 
#define PARAM_CTRL(n)   ((n==CAN1_CTRL)|(n==CAN2_CTRL))
 
#define PARAM_MSG_DISABLE(n)   ((n==MSG_ENABLE)|(n==MSG_DISABLE))
 
#define PARAM_INT_EN_TYPE(n)
 
#define PARAM_AFLUT_ENTRY_TYPE(n)
 
#define PARAM_POSITION(n)   ((n>=0)&&(n<512))
 

Detailed Description

Macro Definition Documentation

#define CAN1SLEEPCLR   ((uint32_t)(1<<1))

Macro defines for CAN Sleep Clear RegisterCAN1 Sleep mode

Definition at line 330 of file lpc17xx_can.h.

#define CAN2SLEEPCLR   ((uint32_t)(1<<2))

CAN2 Sleep Mode

Definition at line 332 of file lpc17xx_can.h.

#define CAN_AFMR_AccBP   ((uint32_t)(1<<1))

CAN Acceptance File Bypass mode

Definition at line 392 of file lpc17xx_can.h.

#define CAN_AFMR_AccOff   ((uint32_t)(1))

Macro defines for Acceptance Filter Mode RegisterCAN Acceptance Filter Off mode

Definition at line 390 of file lpc17xx_can.h.

#define CAN_AFMR_eFCAN   ((uint32_t)(1<<2))

FullCAN Mode Enhancements

Definition at line 394 of file lpc17xx_can.h.

#define CAN_BTR_BRP (   n)    ((uint32_t)(n&0x3FF))

Macro defines for CAN Bus Timing RegisterCAN Baudrate Prescaler

Definition at line 188 of file lpc17xx_can.h.

#define CAN_BTR_SAM (   n)    ((uint32_t)(1<<23))

CAN Sampling

Definition at line 196 of file lpc17xx_can.h.

#define CAN_BTR_SJM (   n)    ((uint32_t)((n&0x3)<<14))

CAN Synchronization Jump Width

Definition at line 190 of file lpc17xx_can.h.

#define CAN_BTR_TESG1 (   n)    ((uint32_t)(n&0xF)<<16))

CAN Time Segment 1

Definition at line 192 of file lpc17xx_can.h.

#define CAN_BTR_TESG2 (   n)    ((uint32_t)(n&0xF)<<20))

CAN Time Segment 2

Definition at line 194 of file lpc17xx_can.h.

#define CAN_CMR_AT   ((uint32_t)(1<<1))

CAN Abort Transmission

Definition at line 86 of file lpc17xx_can.h.

#define CAN_CMR_CDO   ((uint32_t)(1<<3))

CAN Clear Data Overrun

Definition at line 90 of file lpc17xx_can.h.

#define CAN_CMR_RRB   ((uint32_t)(1<<2))

CAN Release Receive Buffer

Definition at line 88 of file lpc17xx_can.h.

#define CAN_CMR_SRR   ((uint32_t)(1<<4))

CAN Self Reception Request

Definition at line 92 of file lpc17xx_can.h.

#define CAN_CMR_STB1   ((uint32_t)(1<<5))

CAN Select Tx Buffer 1

Definition at line 94 of file lpc17xx_can.h.

#define CAN_CMR_STB2   ((uint32_t)(1<<6))

CAN Select Tx Buffer 2

Definition at line 96 of file lpc17xx_can.h.

#define CAN_CMR_STB3   ((uint32_t)(1<<7))

CAN Select Tx Buffer 3

Definition at line 98 of file lpc17xx_can.h.

#define CAN_CMR_TR   ((uint32_t)(1))

Macro defines for CAN Command RegisterCAN Transmission Request

Definition at line 84 of file lpc17xx_can.h.

#define CAN_Eff_GRP_sa (   n)    ((uint32_t)((n&3FF)<<2))

Macro defines for Extended Frame Group Start Address RegisterThe start address of the table of grouped Extended Identifier

Definition at line 418 of file lpc17xx_can.h.

#define CAN_EFF_sa (   n)    ((uint32_t)((n&1FF)<<2))

Macro defines for Extended Frame Start Address RegisterThe start address of the table of individual Extended Identifier

Definition at line 412 of file lpc17xx_can.h.

#define CAN_EndofTable (   n)    ((uint32_t)((n&3FF)<<2))

Macro defines for End Of AF Table RegisterThe End of Table of AF LookUp Table

Definition at line 424 of file lpc17xx_can.h.

#define CAN_EWL_EWL (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Error Warning Limit RegisterCAN Error Warning Limit

Definition at line 202 of file lpc17xx_can.h.

#define CAN_FCANIC0_IntPnd (   n)    ((uint32_t)(1<<n))

Macro defines for FullCAN Interrupt and Capture Register 0FullCAN Interrupt and Capture (0-31)

Definition at line 448 of file lpc17xx_can.h.

#define CAN_FCANIC1_IntPnd (   n)    ((uint32_t)(1<<(n-32)))

Macro defines for FullCAN Interrupt and Capture Register 1FullCAN Interrupt and Capture (0-31)

Definition at line 454 of file lpc17xx_can.h.

#define CAN_FCANIE   ((uint32_t)(1))

Macro defines for Global FullCANInterrupt Enable RegisterGlobal FullCANInterrupt Enable

Definition at line 442 of file lpc17xx_can.h.

#define CAN_GSR_BS   ((uint32_t)(1<<7))

CAN Bus Status

Definition at line 118 of file lpc17xx_can.h.

#define CAN_GSR_DOS   ((uint32_t)(1<<1))

CAN Data Overrun Status

Definition at line 106 of file lpc17xx_can.h.

#define CAN_GSR_ES   ((uint32_t)(1<<6))

CAN Error Status

Definition at line 116 of file lpc17xx_can.h.

#define CAN_GSR_RBS   ((uint32_t)(1))

Macro defines for CAN Global Status RegisterCAN Receive Buffer Status

Definition at line 104 of file lpc17xx_can.h.

#define CAN_GSR_RS   ((uint32_t)(1<<4))

CAN Receive Status

Definition at line 112 of file lpc17xx_can.h.

#define CAN_GSR_RXERR (   n)    ((uint32_t)((n&0xFF)<<16))

CAN Current value of the Rx Error Counter

Definition at line 120 of file lpc17xx_can.h.

#define CAN_GSR_TBS   ((uint32_t)(1<<2))

CAN Transmit Buffer Status

Definition at line 108 of file lpc17xx_can.h.

#define CAN_GSR_TCS   ((uint32_t)(1<<3))

CAN Transmit Complete Status

Definition at line 110 of file lpc17xx_can.h.

#define CAN_GSR_TS   ((uint32_t)(1<<5))

CAN Transmit Status

Definition at line 114 of file lpc17xx_can.h.

#define CAN_GSR_TXERR (   n)    ((uint32_t)(n&0xFF)<<24))

CAN Current value of the Tx Error Counter

Definition at line 122 of file lpc17xx_can.h.

#define CAN_ICR_ALCBIT (   n)    ((uint32_t)((n&0xFF)<<24))

CAN Arbitration Lost Capture

Definition at line 156 of file lpc17xx_can.h.

#define CAN_ICR_ALI   ((uint32_t)(1<<6))

CAN Arbitration Lost Interrupt

Definition at line 140 of file lpc17xx_can.h.

#define CAN_ICR_BEI   ((uint32_t)(1<<7))

CAN Bus Error Interrupt

Definition at line 142 of file lpc17xx_can.h.

#define CAN_ICR_DOI   ((uint32_t)(1<<3))

CAN Data Overrun Interrupt

Definition at line 134 of file lpc17xx_can.h.

#define CAN_ICR_EI   ((uint32_t)(1<<2))

CAN Error Warning Interrupt

Definition at line 132 of file lpc17xx_can.h.

#define CAN_ICR_EPI   ((uint32_t)(1<<5))

CAN Error Passive Interrupt

Definition at line 138 of file lpc17xx_can.h.

#define CAN_ICR_ERRBIT (   n)    ((uint32_t)((n&0x1F)<<16))

CAN Error Code Capture

Definition at line 150 of file lpc17xx_can.h.

#define CAN_ICR_ERRC (   n)    ((uint32_t)((n&0x3)<<22))

CAN Error Capture

Definition at line 154 of file lpc17xx_can.h.

#define CAN_ICR_ERRDIR   ((uint32_t)(1<<21))

CAN Error Direction

Definition at line 152 of file lpc17xx_can.h.

#define CAN_ICR_IDI   ((uint32_t)(1<<8))

CAN ID Ready Interrupt

Definition at line 144 of file lpc17xx_can.h.

#define CAN_ICR_RI   ((uint32_t)(1))

Macro defines for CAN Interrupt and Capture RegisterCAN Receive Interrupt

Definition at line 128 of file lpc17xx_can.h.

#define CAN_ICR_TI1   ((uint32_t)(1<<1))

CAN Transmit Interrupt 1

Definition at line 130 of file lpc17xx_can.h.

#define CAN_ICR_TI2   ((uint32_t)(1<<9))

CAN Transmit Interrupt 2

Definition at line 146 of file lpc17xx_can.h.

#define CAN_ICR_TI3   ((uint32_t)(1<<10))

CAN Transmit Interrupt 3

Definition at line 148 of file lpc17xx_can.h.

#define CAN_ICR_WUI   ((uint32_t)(1<<4))

CAN Wake-Up Interrupt

Definition at line 136 of file lpc17xx_can.h.

#define CAN_IER_ALIE   ((uint32_t)(1<<6))

CAN Arbitration Lost Interrupt Enable

Definition at line 174 of file lpc17xx_can.h.

#define CAN_IER_BEIE   ((uint32_t)(1<<7))

CAN Bus Error Interrupt Enable

Definition at line 176 of file lpc17xx_can.h.

#define CAN_IER_DOIE   ((uint32_t)(1<<3))

CAN Data Overrun Interrupt Enable

Definition at line 168 of file lpc17xx_can.h.

#define CAN_IER_EIE   ((uint32_t)(1<<2))

CAN Error Warning Interrupt Enable

Definition at line 166 of file lpc17xx_can.h.

#define CAN_IER_EPIE   ((uint32_t)(1<<5))

CAN Error Passive Interrupt Enable

Definition at line 172 of file lpc17xx_can.h.

#define CAN_IER_IDIE   ((uint32_t)(1<<8))

CAN ID Ready Interrupt Enable

Definition at line 178 of file lpc17xx_can.h.

#define CAN_IER_RIE   ((uint32_t)(1))

Macro defines for CAN Interrupt Enable RegisterCAN Receive Interrupt Enable

Definition at line 162 of file lpc17xx_can.h.

#define CAN_IER_TIE1   ((uint32_t)(1<<1))

CAN Transmit Interrupt Enable for buffer 1

Definition at line 164 of file lpc17xx_can.h.

#define CAN_IER_TIE2   ((uint32_t)(1<<9))

CAN Transmit Enable Interrupt for Buffer 2

Definition at line 180 of file lpc17xx_can.h.

#define CAN_IER_TIE3   ((uint32_t)(1<<10))

CAN Transmit Enable Interrupt for Buffer 3

Definition at line 182 of file lpc17xx_can.h.

#define CAN_IER_WUIE   ((uint32_t)(1<<4))

CAN Wake-Up Interrupt Enable

Definition at line 170 of file lpc17xx_can.h.

#define CAN_LUTerr   ((uint32_t)(1))

Macro defines for LUT Error RegisterCAN Look-Up Table Error

Definition at line 436 of file lpc17xx_can.h.

#define CAN_LUTerrAd (   n)    ((uint32_t)((n&1FF)<<2))

Macro defines for LUT Error Address RegisterCAN Look-Up Table Error Address

Definition at line 430 of file lpc17xx_can.h.

#define CAN_MOD_LOM   ((uint32_t)(1<<1))

CAN Listen Only Mode

Definition at line 68 of file lpc17xx_can.h.

#define CAN_MOD_RM   ((uint32_t)(1))

Macro defines for CAN Mode RegisterCAN Reset mode

Definition at line 66 of file lpc17xx_can.h.

#define CAN_MOD_RPM   ((uint32_t)(1<<5))

CAN Receive Polarity mode

Definition at line 76 of file lpc17xx_can.h.

#define CAN_MOD_SM   ((uint32_t)(1<<4))

CAN Sleep mode

Definition at line 74 of file lpc17xx_can.h.

#define CAN_MOD_STM   ((uint32_t)(1<<2))

CAN Self Test mode

Definition at line 70 of file lpc17xx_can.h.

#define CAN_MOD_TM   ((uint32_t)(1<<7))

CAN Test mode

Definition at line 78 of file lpc17xx_can.h.

#define CAN_MOD_TPM   ((uint32_t)(1<<3))

CAN Transmit Priority mode

Definition at line 72 of file lpc17xx_can.h.

#define CAN_MSR_BS1   ((uint32_t)(1<<8))

Same CAN Bus Status in CAN1GSR

Definition at line 382 of file lpc17xx_can.h.

#define CAN_MSR_BS2   ((uint32_t)(1<<9))

Same CAN Bus Status in CAN2GSR

Definition at line 384 of file lpc17xx_can.h.

#define CAN_MSR_E1   ((uint32_t)(1))

Macro defines for Central Miscellaneous Status RegisterSame CAN Error Status in CAN1GSR

Definition at line 378 of file lpc17xx_can.h.

#define CAN_MSR_E2   ((uint32_t)(1<<1))

Same CAN Error Status in CAN2GSR

Definition at line 380 of file lpc17xx_can.h.

#define CAN_RDA_DATA1 (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Receive Data A RegisterCAN Receive Data 1

Definition at line 262 of file lpc17xx_can.h.

#define CAN_RDA_DATA2 (   n)    ((uint32_t)((n&0xFF)<<8))

CAN Receive Data 2

Definition at line 264 of file lpc17xx_can.h.

#define CAN_RDA_DATA3 (   n)    ((uint32_t)((n&0xFF)<<16))

CAN Receive Data 3

Definition at line 266 of file lpc17xx_can.h.

#define CAN_RDA_DATA4 (   n)    ((uint32_t)((n&0xFF)<<24))

CAN Receive Data 4

Definition at line 268 of file lpc17xx_can.h.

#define CAN_RDB_DATA5 (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Receive Data B RegisterCAN Receive Data 5

Definition at line 274 of file lpc17xx_can.h.

#define CAN_RDB_DATA6 (   n)    ((uint32_t)((n&0xFF)<<8))

CAN Receive Data 6

Definition at line 276 of file lpc17xx_can.h.

#define CAN_RDB_DATA7 (   n)    ((uint32_t)((n&0xFF)<<16))

CAN Receive Data 7

Definition at line 278 of file lpc17xx_can.h.

#define CAN_RDB_DATA8 (   n)    ((uint32_t)((n&0xFF)<<24))

CAN Receive Data 8

Definition at line 280 of file lpc17xx_can.h.

#define CAN_RFS_BP   ((uint32_t)(1<<10))

CAN Bypass

Definition at line 242 of file lpc17xx_can.h.

#define CAN_RFS_DLC (   n)    ((uint32_t)((n&0xF)<<16)

CAN Data Length Code

Definition at line 244 of file lpc17xx_can.h.

#define CAN_RFS_FF   ((uint32_t)(1<<31))

CAN control 11 bit or 29 bit Identifier

Definition at line 248 of file lpc17xx_can.h.

#define CAN_RFS_ID_INDEX (   n)    ((uint32_t)(n&0x3FF))

Macro defines for CAN Receive Frame Status RegisterCAN ID Index

Definition at line 240 of file lpc17xx_can.h.

#define CAN_RFS_RTR   ((uint32_t)(1<<30))

CAN Remote Transmission Request

Definition at line 246 of file lpc17xx_can.h.

#define CAN_RID_ID_11 (   n)    ((uint32_t)(n&0x7FF))

Macro defines for CAN Receive Identifier RegisterCAN 11 bit Identifier

Definition at line 254 of file lpc17xx_can.h.

#define CAN_RID_ID_29 (   n)    ((uint32_t)(n&0x1FFFFFFF))

CAN 29 bit Identifier

Definition at line 256 of file lpc17xx_can.h.

#define CAN_RSR_DOS1   ((uint32_t)(1<<16))

CAN Data Overrun Status 1

Definition at line 370 of file lpc17xx_can.h.

#define CAN_RSR_DOS2   ((uint32_t)(1<<17))

CAN Data Overrun Status 1

Definition at line 372 of file lpc17xx_can.h.

#define CAN_RSR_RB1   ((uint32_t)(1<<8))

CAN Receive Buffer Status 1

Definition at line 366 of file lpc17xx_can.h.

#define CAN_RSR_RB2   ((uint32_t)(1<<9))

CAN Receive Buffer Status 2

Definition at line 368 of file lpc17xx_can.h.

#define CAN_RSR_RS1   ((uint32_t)(1))

Macro defines for Central Receive Status RegisterCAN Receive Status 1

Definition at line 362 of file lpc17xx_can.h.

#define CAN_RSR_RS2   ((uint32_t)(1<<1))

CAN Receive Status 1

Definition at line 364 of file lpc17xx_can.h.

#define CAN_SFF_GRP_sa (   n)    ((uint32_t)((n&3FF)<<2))

Macro defines for Standard Frame Group Start Address RegisterThe start address of the table of grouped Standard Identifier

Definition at line 406 of file lpc17xx_can.h.

#define CAN_SR_BS   ((uint32_t)(1<<7))

CAN Bus Status

Definition at line 222 of file lpc17xx_can.h.

#define CAN_SR_DOS   ((uint32_t)(1<<1))

CAN Data Overrun Status

Definition at line 210 of file lpc17xx_can.h.

#define CAN_SR_ES   ((uint32_t)(1<<6))

CAN Error Status

Definition at line 220 of file lpc17xx_can.h.

#define CAN_SR_RBS   ((uint32_t)(1))

Macro defines for CAN Status RegisterCAN Receive Buffer Status

Definition at line 208 of file lpc17xx_can.h.

#define CAN_SR_RS   ((uint32_t)(1<<4))

CAN Receive Status

Definition at line 216 of file lpc17xx_can.h.

#define CAN_SR_TBS1   ((uint32_t)(1<<2))

CAN Transmit Buffer Status 1

Definition at line 212 of file lpc17xx_can.h.

#define CAN_SR_TBS2   ((uint32_t)(1<<10))

CAN Transmit Buffer Status 2

Definition at line 224 of file lpc17xx_can.h.

#define CAN_SR_TBS3   ((uint32_t)(1<<18))

CAN Transmit Buffer Status 2

Definition at line 230 of file lpc17xx_can.h.

#define CAN_SR_TCS1   ((uint32_t)(1<<3))

CAN Transmission Complete Status of Buffer 1

Definition at line 214 of file lpc17xx_can.h.

#define CAN_SR_TCS2   ((uint32_t)(1<<11))

CAN Transmission Complete Status of Buffer 2

Definition at line 226 of file lpc17xx_can.h.

#define CAN_SR_TCS3   ((uint32_t)(1<<19))

CAN Transmission Complete Status of Buffer 2

Definition at line 232 of file lpc17xx_can.h.

#define CAN_SR_TS1   ((uint32_t)(1<<5))

CAN Transmit Status 1

Definition at line 218 of file lpc17xx_can.h.

#define CAN_SR_TS2   ((uint32_t)(1<<13))

CAN Transmit Status 2

Definition at line 228 of file lpc17xx_can.h.

#define CAN_SR_TS3   ((uint32_t)(1<<21))

CAN Transmit Status 2

Definition at line 234 of file lpc17xx_can.h.

#define CAN_STT_sa (   n)    ((uint32_t)((n&1FF)<<2))

Macro defines for Standard Frame Individual Start Address RegisterThe start address of the table of individual Standard Identifier

Definition at line 400 of file lpc17xx_can.h.

#define CAN_TDA_DATA1 (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Transmit Data A RegisterCAN Transmit Data 1

Definition at line 306 of file lpc17xx_can.h.

#define CAN_TDA_DATA2 (   n)    ((uint32_t)((n&0xFF)<<8))

CAN Transmit Data 2

Definition at line 308 of file lpc17xx_can.h.

#define CAN_TDA_DATA3 (   n)    ((uint32_t)((n&0xFF)<<16))

CAN Transmit Data 3

Definition at line 310 of file lpc17xx_can.h.

#define CAN_TDA_DATA4 (   n)    ((uint32_t)((n&0xFF)<<24))

CAN Transmit Data 4

Definition at line 312 of file lpc17xx_can.h.

#define CAN_TDA_DATA5 (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Transmit Data B RegisterCAN Transmit Data 5

Definition at line 318 of file lpc17xx_can.h.

#define CAN_TDA_DATA6 (   n)    ((uint32_t)((n&0xFF)<<8))

CAN Transmit Data 6

Definition at line 320 of file lpc17xx_can.h.

#define CAN_TDA_DATA7 (   n)    ((uint32_t)((n&0xFF)<<16))

CAN Transmit Data 7

Definition at line 322 of file lpc17xx_can.h.

#define CAN_TDA_DATA8 (   n)    ((uint32_t)((n&0xFF)<<24))

CAN Transmit Data 8

Definition at line 324 of file lpc17xx_can.h.

#define CAN_TFI_DLC (   n)    ((uint32_t)((n&0xF)<<16))

CAN Data Length Code

Definition at line 288 of file lpc17xx_can.h.

#define CAN_TFI_FF   ((uint32_t)(1<<31))

CAN control 11-bit or 29-bit Identifier

Definition at line 292 of file lpc17xx_can.h.

#define CAN_TFI_PRIO (   n)    ((uint32_t)(n&0xFF))

Macro defines for CAN Transmit Frame Information RegisterCAN Priority

Definition at line 286 of file lpc17xx_can.h.

#define CAN_TFI_RTR   ((uint32_t)(1<<30))

CAN Remote Frame Transmission

Definition at line 290 of file lpc17xx_can.h.

#define CAN_TID_ID11 (   n)    ((uint32_t)(n&0x7FF))

Macro defines for CAN Transmit Identifier RegisterCAN 11-bit Identifier

Definition at line 298 of file lpc17xx_can.h.

#define CAN_TID_ID29 (   n)    ((uint32_t)(n&0x1FFFFFFF))

CAN 11-bit Identifier

Definition at line 300 of file lpc17xx_can.h.

#define CAN_TSR_TBS1   ((uint32_t)(1<<8))

CAN Transmit Buffer Status 1

Definition at line 350 of file lpc17xx_can.h.

#define CAN_TSR_TBS2   ((uint32_t)(1<<9))

CAN Transmit Buffer Status 2

Definition at line 352 of file lpc17xx_can.h.

#define CAN_TSR_TCS1   ((uint32_t)(1<<16))

CAN Transmission Complete Status 1

Definition at line 354 of file lpc17xx_can.h.

#define CAN_TSR_TCS2   ((uint32_t)(1<<17))

CAN Transmission Complete Status 2

Definition at line 356 of file lpc17xx_can.h.

#define CAN_TSR_TS1   ((uint32_t)(1))

Macro defines for Central transmit Status RegisterCAN Transmit 1

Definition at line 346 of file lpc17xx_can.h.

#define CAN_TSR_TS2   ((uint32_t)(1<<1))

CAN Transmit 2

Definition at line 348 of file lpc17xx_can.h.

#define CAN_WAKEFLAGES_CAN1WAKE   ((uint32_t)(1<<1))

Macro defines for CAN Wake up Flags RegisterCAN1 Sleep mode

Definition at line 338 of file lpc17xx_can.h.

#define CAN_WAKEFLAGES_CAN2WAKE   ((uint32_t)(1<<2))

CAN2 Sleep Mode

Definition at line 340 of file lpc17xx_can.h.

#define PARAM_AFLUT_ENTRY_TYPE (   n)
Value:

Macro to check AFLUT Entry type

Definition at line 524 of file lpc17xx_can.h.

#define PARAM_AFMODE_TYPE (   n)
Value:
((n==CAN_Normal)||(n==CAN_AccOff) \
||(n==CAN_AccBP)||(n==CAN_eFCAN))

Macro to check AF Mode type parameter

Definition at line 500 of file lpc17xx_can.h.

#define PARAM_CANAFRAMx (   x)    (((uint32_t*)x)== (uint32_t*)LPC_CANAF_RAM)

Definition at line 466 of file lpc17xx_can.h.

#define PARAM_CANAFx (   x)    (((uint32_t*)x)== ((uint32_t*)LPC_CANAF))

Definition at line 463 of file lpc17xx_can.h.

#define PARAM_CANCRx (   x)    (((uint32_t*)x)==((uint32_t*)LPC_CANCR))

Definition at line 469 of file lpc17xx_can.h.

#define PARAM_CANx (   x)
Value:
((((uint32_t*)x)==((uint32_t *)LPC_CAN1)) \
||(((uint32_t*)x)==((uint32_t *)LPC_CAN2)))

Macro to determine if it is valid CAN peripheral or not

Definition at line 459 of file lpc17xx_can.h.

#define PARAM_CR_STS_TYPE (   n)
Value:
||(n==CANCR_MS))

Macro to check CR status type

Definition at line 497 of file lpc17xx_can.h.

#define PARAM_CTRL (   n)    ((n==CAN1_CTRL)|(n==CAN2_CTRL))

Macro define for struct AF_Section parameter

Definition at line 510 of file lpc17xx_can.h.

#define PARAM_CTRL_STS_TYPE (   n)
Value:

Macro to check Control/Central Status type parameter

Definition at line 493 of file lpc17xx_can.h.

#define PARAM_DLC (   n)    ((n>>4)==0) /*-- 4 bit --*/

Macro to check DLC value

Definition at line 482 of file lpc17xx_can.h.

#define PARAM_FRAME_TYPE (   n)    ((n==DATA_FRAME)||(n==REMOTE_FRAME))

Macro to check Frame type

Definition at line 490 of file lpc17xx_can.h.

#define PARAM_GRP_ID (   x,
 
)    ((x<=y))

Macro to check Group identifier

Definition at line 487 of file lpc17xx_can.h.

#define PARAM_I2S_DATA (   data)    ((data>=0)&&(data <= 0xFFFFFFFF))

Macro to check Data to send valid

Definition at line 472 of file lpc17xx_can.h.

#define PARAM_ID_11 (   n)    ((n>>11)==0) /*-- 11 bit --*/

Macro to check Frame Identifier

Definition at line 478 of file lpc17xx_can.h.

#define PARAM_ID_29 (   n)    ((n>>29)==0) /*-- 29 bit --*/

Definition at line 479 of file lpc17xx_can.h.

#define PARAM_ID_FORMAT (   n)    ((n==STD_ID_FORMAT)||(n==EXT_ID_FORMAT))

Macro to check ID format type

Definition at line 484 of file lpc17xx_can.h.

#define PARAM_INT_EN_TYPE (   n)
Value:
((n==CANINT_RIE)||(n==CANINT_TIE1) \
||(n==CANINT_EIE)||(n==CANINT_DOIE) \
||(n==CANINT_WUIE)||(n==CANINT_EPIE) \
||(n==CANINT_ALIE)||(n==CANINT_BEIE) \
||(n==CANINT_IDIE)||(n==CANINT_TIE2) \
||(n==CANINT_TIE3)||(n==CANINT_FCE))

Macro to check Interrupt Type parameter

Definition at line 516 of file lpc17xx_can.h.

#define PARAM_MODE_TYPE (   n)
Value:

Macro to check Operation Mode

Definition at line 504 of file lpc17xx_can.h.

#define PARAM_MSG_DISABLE (   n)    ((n==MSG_ENABLE)|(n==MSG_DISABLE))

Macro define for struct AF_Section parameter

Definition at line 513 of file lpc17xx_can.h.

#define PARAM_POSITION (   n)    ((n>=0)&&(n<512))

Macro to check position

Definition at line 529 of file lpc17xx_can.h.

#define PRAM_I2S_FREQ (   freq)    ((freq>=16000)&&(freq <= 96000))

Macro to check frequency value

Definition at line 475 of file lpc17xx_can.h.