| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
CHIP: LPC18xx/43xx CCAN driver
LPC18xx/43xx chip specific drivers

## Detailed Description

## Functions
STATIC INLINE void | Chip_CCAN_IntEnable (LPC_CCAN_T *pCCAN, FunctionalState NewState)
| Enable/Disable CCAN Interrupts.
STATIC INLINE uint32_t | Chip_CCAN_GetIntID (LPC_CCAN_T *pCCAN)
| Get the source ID of an interrupt.
STATIC INLINE uint32_t | Chip_CCAN_GetStatus (LPC_CCAN_T *pCCAN)
| Get the CCAN status register.
STATIC INLINE void | Chip_CCAN_GetMsgObject (LPC_CCAN_T *pCCAN, uint8_t msg_num, message_object *msg_buf)
| Get a message object in message RAM into the message buffer.
void | Chip_CCAN_Init (LPC_CCAN_T *pCCAN)
| Initialize the CCAN peripheral, free all message object in RAM.
void | Chip_CCAN_DeInit (LPC_CCAN_T *pCCAN)
| De-initialize the CCAN peripheral.
void | Chip_CCAN_SetBitRate (LPC_CCAN_T *pCCAN, uint32_t bitRate)
| Select bit rate for CCAN bus.
void | Chip_CCAN_ClearStatus (LPC_CCAN_T *pCCAN, IP_CCAN_STATUS_T status)
| Clear the status of CCAN bus.
void | Chip_CCAN_ClearIntPend (LPC_CCAN_T *pCCAN, uint8_t msg_num, uint8_t TRxMode)
| Clear the pending interrupt.
void | Chip_CCAN_Send (LPC_CCAN_T *pCCAN, uint32_t RemoteEnable, message_object *msg_ptr)
| Send a message.
void | Chip_CCAN_AddReceiveID (LPC_CCAN_T *pCCAN, uint32_t rev_id)
| Register a message ID for receiving.
void | Chip_CCAN_DeleteReceiveID (LPC_CCAN_T *pCCAN, uint32_t rev_id)
| Remove a registered message ID from receiving.

## Function Documentation

void Chip_CCAN_AddReceiveID | ( | LPC_CCAN_T * | pCCAN,
|  | uint32_t | rev_id
| ) |  |

Register a message ID for receiving.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  rev_id | : Received message ID

Returns
  Nothing

Definition at line 137 of file ccan_18xx_43xx.c.

void Chip_CCAN_ClearIntPend | ( | LPC_CCAN_T * | pCCAN,
|  | uint8_t | msg_num,
|  | uint8_t | TRxMode
| ) |  |

Clear the pending interrupt.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  msg_num | : Message number
  TRxMode | : Select transmit or receive interrupt to be cleared

Returns
  Nothing

Definition at line 162 of file ccan_18xx_43xx.c.

void Chip_CCAN_ClearStatus | ( | LPC_CCAN_T * | pCCAN,
|  | IP_CCAN_STATUS_T | status
| ) |  |

Clear the status of CCAN bus.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  status | : Status to be cleared

Returns
  Nothing

Definition at line 176 of file ccan_18xx_43xx.c.

void Chip_CCAN_DeInit | ( | LPC_CCAN_T * | pCCAN | ) |

De-initialize the CCAN peripheral.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip

Returns
  Nothing

Definition at line 130 of file ccan_18xx_43xx.c.

void Chip_CCAN_DeleteReceiveID | ( | LPC_CCAN_T * | pCCAN,
|  | uint32_t | rev_id
| ) |  |

Remove a registered message ID from receiving.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  rev_id | : Received message ID to be removed

Returns
  Nothing

Definition at line 149 of file ccan_18xx_43xx.c.

STATIC INLINE uint32_t Chip_CCAN_GetIntID | ( | LPC_CCAN_T * | pCCAN | ) |

Get the source ID of an interrupt.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip

Returns
  Interrupt source ID

Definition at line 64 of file ccan_18xx_43xx.h.

STATIC INLINE void Chip_CCAN_GetMsgObject | ( | LPC_CCAN_T * | pCCAN,
|  | uint8_t | msg_num,
|  | message_object * | msg_buf
| ) |  |

Get a message object in message RAM into the message buffer.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  msg_num | : The number of message object in message RAM to be get
  msg_buf | : Pointer of the message buffer

Returns
  Nothing

Definition at line 86 of file ccan_18xx_43xx.h.

STATIC INLINE uint32_t Chip_CCAN_GetStatus | ( | LPC_CCAN_T * | pCCAN | ) |

Get the CCAN status register.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip

Returns
  CCAN status register

Definition at line 74 of file ccan_18xx_43xx.h.

void Chip_CCAN_Init | ( | LPC_CCAN_T * | pCCAN | ) |

Initialize the CCAN peripheral, free all message object in RAM.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip

Returns
  Nothing

Definition at line 116 of file ccan_18xx_43xx.c.

STATIC INLINE void Chip_CCAN_IntEnable | ( | LPC_CCAN_T * | pCCAN,
|  | FunctionalState | NewState
| ) |  |

Enable/Disable CCAN Interrupts.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  NewState | : New state, ENABLE or DISABLE

Returns
  Nothing

Definition at line 54 of file ccan_18xx_43xx.h.

void Chip_CCAN_Send | ( | LPC_CCAN_T * | pCCAN,
|  | uint32_t | RemoteEnable,
|  | message_object * | msg_ptr
| ) |  |

Send a message.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  RemoteEnable,: | Enable/Disable passives transmit by using remote frame
  msg_ptr | : Message to be transmitted

Returns
  Nothing

Definition at line 101 of file ccan_18xx_43xx.c.

void Chip_CCAN_SetBitRate | ( | LPC_CCAN_T * | pCCAN,
|  | uint32_t | bitRate
| ) |  |

Select bit rate for CCAN bus.

Parameters

  pCCAN | : The base of CCAN peripheral on the chip
  bitRate | : Bit rate to be set

Returns
  Nothing

Definition at line 73 of file ccan_18xx_43xx.c.