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

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

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
can_001.c File Reference
`#include "can_001.h"`

Go to the source code of this file.

## Functions
STATIC void | getSectionAddress (IP_CAN_001_AF_T *pCanAF, IP_CAN_AF_RAM_SECTION_T SectionID, uint16_t *StartAddr, uint16_t *EndAddr)
STATIC INLINE uint16_t | getTotalEntryNum (IP_CAN_001_AF_T *pCanAF)
STATIC INLINE void | setSectionEndAddress (IP_CAN_001_AF_T *pCanAF, IP_CAN_AF_RAM_SECTION_T SectionID, uint16_t EndAddr)
STATIC INLINE Status | getReceiveFrameInfo (IP_CAN_001_T *pCAN, IP_CAN_001_RX_T *pRxFrame)
STATIC INLINE void | setSendFrameInfo (IP_CAN_001_T *pCAN, IP_CAN_BUFFER_ID_T TxBufID, IP_CAN_001_TX_T *pTxFrame)
STATIC uint16_t | createStdIDEntry (IP_CAN_STD_ID_Entry_T *pEntryInfo, bool IsFullCANEntry)
STATIC INLINE uint16_t | createUnUsedSTDEntry (uint8_t CtrlNo)
STATIC void | readStdIDEntry (uint16_t EntryVal, IP_CAN_STD_ID_Entry_T *pEntryInfo)
STATIC Status | setupSTDSection (uint32_t *pCanAFRamAddr, IP_CAN_STD_ID_Entry_T *pStdCANSec, uint16_t EntryNum, bool IsFullCANEntry)
STATIC Status | setupSTDRangeSection (uint32_t *pCanAFRamAddr, IP_CAN_STD_ID_RANGE_Entry_T *pStdRangeCANSec, uint16_t EntryNum)
STATIC void | shiftSTDEntryDown (uint32_t *arr, int32_t num)
STATIC void | shiftSTDEntryUp (uint32_t *arr, int32_t num)
STATIC uint32_t | createExtIDEntry (IP_CAN_EXT_ID_Entry_T *pEntryInfo)
STATIC void | readExtIDEntry (uint32_t EntryVal, IP_CAN_EXT_ID_Entry_T *pEntryInfo)
STATIC Status | setupEXTSection (uint32_t *pCanAFRamAddr, IP_CAN_EXT_ID_Entry_T *pExtCANSec, uint16_t EntryNum)
STATIC Status | setupEXTRangeSection (uint32_t *pCanAFRamAddr, IP_CAN_EXT_ID_RANGE_Entry_T *pExtRangeCANSec, uint16_t EntryNum)
STATIC uint32_t | getArrayVal (uint8_t *arr, uint32_t startIndex, uint8_t byteNum)
STATIC int32_t | searchInsertIndex (uint32_t *arr, uint32_t arrNum, uint32_t val, uint32_t mask, uint8_t unitSize)
void | IP_CAN_Init (IP_CAN_001_T *pCAN)
| Initialize the CAN peripheral.
void | IP_CAN_SetMode (IP_CAN_001_T *pCAN, uint32_t Mode, FunctionalState NewState)
| Enable/Disable the specified mode in CAN controller.
void | IP_CAN_SetBusTiming (IP_CAN_001_T *pCAN, IP_CAN_BUS_TIMING_T *pBusTiming)
| Set Bus Timing for the CAN Controller.
Status | IP_CAN_Receive (IP_CAN_001_T *pCAN, IP_CAN_MSG_T *pMsg)
| Get message received by the CAN Controller.
Status | IP_CAN_Send (IP_CAN_001_T *pCAN, IP_CAN_BUFFER_ID_T TxBufID, IP_CAN_MSG_T *pMsg)
| Request the CAN Controller to send message.
void | IP_CAN_FullCANIntConfig (IP_CAN_001_AF_T *pCanAF, FunctionalState NewState)
| Enable/Disable the interrupts of the CAN Controller in FullCAN Mode.
uint32_t | IP_CAN_GetFullCANIntStatus (IP_CAN_001_AF_T *pCanAF, uint8_t ObjID)
| Get FullCAN interrupt status of the object.
Status | IP_CAN_FullCANReceive (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint8_t ObjID, IP_CAN_MSG_T *pMsg, uint8_t *pSCC)
| Get FULLCANmessage automatically received by the AF.
void | IP_CAN_AF_Init (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam)
| Initialize CAN Acceptance Filter.
void | IP_CAN_ClearAFLUT (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam)
| Clear CAN AF LUT.
Status | IP_CAN_SetAFLUT (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_AF_LUT_T *pAFSections)
| Set CAN AF LUT.
uint16_t | IP_CAN_GetEntriesNum (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_AF_RAM_SECTION_T SectionID)
| Get the number of entries of the given section.
Status | IP_CAN_InsertSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_STD_ID_Entry_T *pEntry, bool IsFullCANEntry)
Status | IP_CAN_InsertFullCANEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_STD_ID_Entry_T *pEntry)
| Insert a FullCAN Entry into the current LUT.
Status | IP_CAN_InsertIndividualSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_STD_ID_Entry_T *pEntry)
| Insert an individual Standard Entry into the current LUT.
Status | IP_CAN_InsertIndividualEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_EXT_ID_Entry_T *pEntry)
| Insert an individual Extended Entry into the current LUT.
Status | IP_CAN_InsertGroupSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_STD_ID_RANGE_Entry_T *pEntry)
| Insert an Group Standard Entry into the current LUT.
Status | IP_CAN_InsertGroupEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_EXT_ID_RANGE_Entry_T *pEntry)
| Insert an Group Extended Entry into the current LUT.
Status | IP_CAN_RemoveSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t IDIndex, bool IsFullCANEntry)
Status | IP_CAN_RemoveLUTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, IP_CAN_AF_RAM_SECTION_T SectionID, int16_t Position)
Status | IP_CAN_RemoveFullCANEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t Position)
| Remove a FullCAN Entry from the current LUT.
Status | IP_CAN_RemoveIndividualSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t Position)
| Remove an individual Standard Entry from the current LUT.
Status | IP_CAN_RemoveGroupSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t Position)
| Remove an Group Standard Entry from the current LUT.
Status | IP_CAN_RemoveIndividualEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t Position)
| Remove an individual Extended Entry from the current LUT.
Status | IP_CAN_RemoveGroupEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, int16_t Position)
| Remove an Group Extended Entry from the current LUT.
Status | IP_CAN_ReadSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, bool IsFullCANEntry, IP_CAN_STD_ID_Entry_T *pEntry)
Status | IP_CAN_ReadFullCANEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, IP_CAN_STD_ID_Entry_T *pEntry)
| Read a FullCAN Entry into from current LUT.
Status | IP_CAN_ReadIndividualSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, IP_CAN_STD_ID_Entry_T *pEntry)
| Read an individual Standard Entry from the current LUT.
Status | IP_CAN_ReadGroupSTDEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, IP_CAN_STD_ID_RANGE_Entry_T *pEntry)
| Read an Group Standard Entry from the current LUT.
Status | IP_CAN_ReadIndividualEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, IP_CAN_EXT_ID_Entry_T *pEntry)
| Read an individual Extended Entry from the current LUT.
Status | IP_CAN_ReadGroupEXTEntry (IP_CAN_001_AF_T *pCanAF, IP_CAN_001_AF_RAM_T *pCanAFRam, uint16_t Position, IP_CAN_EXT_ID_RANGE_Entry_T *pEntry)
| Read an Group Extended Entry from the current LUT.

## Function Documentation

STATIC uint32_t createExtIDEntry | ( | IP_CAN_EXT_ID_Entry_T * | pEntryInfo | ) |

Definition at line 218 of file can_001.c.

STATIC uint16_t createStdIDEntry | ( | IP_CAN_STD_ID_Entry_T * | pEntryInfo,
|  | bool | IsFullCANEntry
| ) |  |

Definition at line 95 of file can_001.c.

STATIC INLINE uint16_t createUnUsedSTDEntry | ( | uint8_t | CtrlNo | ) |

Definition at line 107 of file can_001.c.

STATIC uint32_t getArrayVal | ( | uint8_t * | arr,
|  | uint32_t | startIndex,
|  | uint8_t | byteNum
| ) |  |

Definition at line 264 of file can_001.c.

STATIC INLINE Status getReceiveFrameInfo | ( | IP_CAN_001_T * | pCAN,
|  | IP_CAN_001_RX_T * | pRxFrame
| ) |  |

Definition at line 80 of file can_001.c.

STATIC void getSectionAddress | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_AF_RAM_SECTION_T | SectionID,
|  | uint16_t * | StartAddr,
|  | uint16_t * | EndAddr
| ) |  |

Definition at line 47 of file can_001.c.

STATIC INLINE uint16_t getTotalEntryNum | ( | IP_CAN_001_AF_T * | pCanAF | ) |

Definition at line 67 of file can_001.c.

Status IP_CAN_InsertSTDEntry | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_001_AF_RAM_T * | pCanAFRam,
|  | IP_CAN_STD_ID_Entry_T * | pEntry,
|  | bool | IsFullCANEntry
| ) |  |

Definition at line 697 of file can_001.c.

Status IP_CAN_ReadSTDEntry | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_001_AF_RAM_T * | pCanAFRam,
|  | uint16_t | Position,
|  | bool | IsFullCANEntry,
|  | IP_CAN_STD_ID_Entry_T * | pEntry
| ) |  |

Definition at line 1263 of file can_001.c.

Status IP_CAN_RemoveLUTEntry | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_001_AF_RAM_T * | pCanAFRam,
|  | IP_CAN_AF_RAM_SECTION_T | SectionID,
|  | int16_t | Position
| ) |  |

Definition at line 1149 of file can_001.c.

Status IP_CAN_RemoveSTDEntry | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_001_AF_RAM_T * | pCanAFRam,
|  | int16_t | IDIndex,
|  | bool | IsFullCANEntry
| ) |  |

Definition at line 1057 of file can_001.c.

STATIC void readExtIDEntry | ( | uint32_t | EntryVal,
|  | IP_CAN_EXT_ID_Entry_T * | pEntryInfo
| ) |  |

Definition at line 227 of file can_001.c.

STATIC void readStdIDEntry | ( | uint16_t | EntryVal,
|  | IP_CAN_STD_ID_Entry_T * | pEntryInfo
| ) |  |

Definition at line 113 of file can_001.c.

STATIC int32_t searchInsertIndex | ( | uint32_t * | arr,
|  | uint32_t | arrNum,
|  | uint32_t | val,
|  | uint32_t | mask,
|  | uint8_t | unitSize
| ) |  |

Definition at line 287 of file can_001.c.

STATIC INLINE void setSectionEndAddress | ( | IP_CAN_001_AF_T * | pCanAF,
|  | IP_CAN_AF_RAM_SECTION_T | SectionID,
|  | uint16_t | EndAddr
| ) |  |

Definition at line 73 of file can_001.c.

STATIC INLINE void setSendFrameInfo | ( | IP_CAN_001_T * | pCAN,
|  | IP_CAN_BUFFER_ID_T | TxBufID,
|  | IP_CAN_001_TX_T * | pTxFrame
| ) |  |

Definition at line 88 of file can_001.c.

STATIC Status setupEXTRangeSection | ( | uint32_t * | pCanAFRamAddr,
|  | IP_CAN_EXT_ID_RANGE_Entry_T * | pExtRangeCANSec,
|  | uint16_t | EntryNum
| ) |  |

Definition at line 256 of file can_001.c.

STATIC Status setupEXTSection | ( | uint32_t * | pCanAFRamAddr,
|  | IP_CAN_EXT_ID_Entry_T * | pExtCANSec,
|  | uint16_t | EntryNum
| ) |  |

Definition at line 234 of file can_001.c.

STATIC Status setupSTDRangeSection | ( | uint32_t * | pCanAFRamAddr,
|  | IP_CAN_STD_ID_RANGE_Entry_T * | pStdRangeCANSec,
|  | uint16_t | EntryNum
| ) |  |

Definition at line 160 of file can_001.c.

STATIC Status setupSTDSection | ( | uint32_t * | pCanAFRamAddr,
|  | IP_CAN_STD_ID_Entry_T * | pStdCANSec,
|  | uint16_t | EntryNum,
|  | bool | IsFullCANEntry
| ) |  |

Definition at line 121 of file can_001.c.

STATIC void shiftSTDEntryDown | ( | uint32_t * | arr,
|  | int32_t | num
| ) |  |

Definition at line 168 of file can_001.c.

STATIC void shiftSTDEntryUp | ( | uint32_t * | arr,
|  | int32_t | num
| ) |  |

Definition at line 191 of file can_001.c.