Hilscher netX microcontroller driver
V0.0.5.0
Documentation of the netX driver package
|
This is the CANCTRL peripheral module driver. More...
Data Structures | |
struct | DRV_CANCTRL_SINGLEFILTER_T |
struct | DRV_CANCTRL_DUALFILTER_T |
struct | DRV_CANCTRL_MESSAGE_T |
This is the CANCTRL peripheral module driver.
This driver is one of our legacy HALs. The support for the legacy hall's is very limited. They are developed and maintained by our chip development and verification department and provide only a hardware near abstraction layer. They are in most cases not convenient or do not support as much functionality as that
#define _HW_CONCAT | ( | a, | |
b | |||
) | a ## b |
Definition at line 66 of file netx_drv_canctrl.c.
#define DRV_CANCTRL_BAUDRATE_1000K 1000 |
Definition at line 61 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_10K 10 |
Definition at line 68 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_125K 125 |
Definition at line 65 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_20K 20 |
Definition at line 67 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_250K 250 |
Definition at line 64 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_500K 500 |
Definition at line 63 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_50K 50 |
Definition at line 66 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_BAUDRATE_800K 800 |
Definition at line 62 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_ARB_LOST_IRQ 0x00000040U |
Definition at line 88 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_BUS_ERROR_IRQ 0x00000080U |
Definition at line 89 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_ARB_LOST_IRQ_EN 0x00000040U |
Definition at line 79 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_BUS_ERROR_IRQ_EN 0x00000080U |
Definition at line 80 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_ERR_PASSIVE_IRQ_EN 0x00000020U |
Definition at line 78 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_OVERRUN_IRQ_EN 0x00000008U |
Definition at line 77 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_RX_IRQ_EN 0x00000001U |
Definition at line 74 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_TX_IRQ_EN 0x00000002U |
Definition at line 75 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_EN_WARNING_IRQ_EN 0x00000004U |
Definition at line 76 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_ERR_PASSIVE_IRQ 0x00000020U |
Definition at line 87 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_OVERRUN_IRQ 0x00000008U |
Definition at line 86 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_RX_IRQ 0x00000001U |
Definition at line 83 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_TX_IRQ 0x00000002U |
Definition at line 84 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_IRQ_WARNING_IRQ 0x00000004U |
Definition at line 85 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_MODE_ACCEPTANCE_MODE 0x00000008U |
Definition at line 95 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_MODE_LISTEN_MODE 0x00000002U |
Definition at line 93 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_MODE_RESET_MODE 0x00000001U |
Definition at line 92 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_MODE_SELFTEST 0x00000004U |
Definition at line 94 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_BUS_STATUS 0x00000080U |
Definition at line 105 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_ERROR_STATUS 0x00000040U |
Definition at line 104 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_OVERRUN 0x00000002U |
Definition at line 99 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_RX_BUF_STATUS 0x00000001U |
Definition at line 98 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_RX_STATUS 0x00000010U |
Definition at line 102 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_TX_BUF_STATUS 0x00000004U |
Definition at line 100 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_TX_COMPLETE 0x00000008U |
Definition at line 101 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_MSK_STATUS_TX_STATUS 0x00000020U |
Definition at line 103 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_OVERSAMPLING_DIS 0 |
Definition at line 71 of file netx_drv_canctrl.h.
#define DRV_CANCTRL_OVERSAMPLING_EN 1 |
Definition at line 70 of file netx_drv_canctrl.h.
#define HAL_CANCTRL_CNT 2 |
Definition at line 76 of file netx_drv_canctrl.c.
#define HALDEC | ( | name | ) | DRV_##name |
Definition at line 184 of file netx_drv_canctrl.h.
#define HALDEF | ( | name | ) | HALDEC(name) |
Definition at line 79 of file netx_drv_canctrl.c.
#define HW_AREAADR | ( | area | ) | _HW_CONCAT(Addr_NX90_, area) |
Definition at line 72 of file netx_drv_canctrl.c.
#define HW_DFLT_BF_VAL | ( | bf | ) | _HW_CONCAT(DFLT_BF_VAL_NX90_, bf) |
Definition at line 69 of file netx_drv_canctrl.c.
#define HW_DFLT_VAL | ( | reg | ) | _HW_CONCAT(DFLT_VAL_NX90_, reg) |
Definition at line 70 of file netx_drv_canctrl.c.
#define HW_MSK | ( | bf | ) | _HW_CONCAT(MSK_NX90_, bf) |
Definition at line 67 of file netx_drv_canctrl.c.
#define HW_PTR_CANCTRL | ( | var | ) |
Definition at line 59 of file netx_drv_canctrl.c.
#define HW_REGADR | ( | reg | ) | _HW_CONCAT(Adr_NX90_, reg) |
Definition at line 71 of file netx_drv_canctrl.c.
#define HW_SRT | ( | bf | ) | _HW_CONCAT(SRT_NX90_, bf) |
Definition at line 68 of file netx_drv_canctrl.c.
#define HW_TYPE | ( | area | ) | _HW_CONCAT(NX90_, area) |
Definition at line 73 of file netx_drv_canctrl.c.
Parameters IDs
Enumerator | |
---|---|
DRV_CANCTRL_DEVICE_ID_0 | |
DRV_CANCTRL_DEVICE_ID_1 |
Definition at line 175 of file netx_drv_canctrl.h.
enum DRV_CANCTRL_PRM_E |
Parameters IDs
Definition at line 155 of file netx_drv_canctrl.h.
enum DRV_CANCTRL_RESULT |
Result Codes for CAN Controller Functions
Definition at line 142 of file netx_drv_canctrl.h.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_AbortMessage | ( | unsigned int | uiInst | ) |
Definition at line 560 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_EnterListenMode | ( | unsigned int | uiInst | ) |
Definition at line 371 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_EnterResetMode | ( | unsigned int | uiInst | ) |
Definition at line 103 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_EnterSelftestMode | ( | unsigned int | uiInst | ) |
Definition at line 423 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetAndClearArblostStatus | ( | unsigned int | uiInst | ) |
Definition at line 785 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetAndClearErrorCode | ( | unsigned int | uiInst | ) |
Definition at line 804 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetAndClearIrqStatus | ( | unsigned int | uiInst | ) |
Definition at line 723 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_GetDualAcceptanceFilter | ( | unsigned int | uiInst, |
DRV_CANCTRL_DUALFILTER_T * | ptFilter | ||
) |
Definition at line 332 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetIrqMask | ( | unsigned int | uiInst | ) |
Definition at line 765 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetMode | ( | unsigned int | uiInst | ) |
Definition at line 684 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_GetPrm | ( | unsigned int | uiInst, |
DRV_CANCTRL_PRM_E | ePrmID, | ||
uint32_t * | pulPrmVal | ||
) |
Definition at line 1012 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetRxErrorCnt | ( | unsigned int | uiInst | ) |
Definition at line 896 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetRxMessageCnt | ( | unsigned int | uiInst | ) |
Definition at line 665 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_GetSingleAcceptanceFilter | ( | unsigned int | uiInst, |
DRV_CANCTRL_SINGLEFILTER_T * | ptFilter | ||
) |
Definition at line 246 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetStatus | ( | unsigned int | uiInst | ) |
Definition at line 703 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetTxErrorCnt | ( | unsigned int | uiInst | ) |
Definition at line 942 of file netx_drv_canctrl.c.
uint32_t HALDEC() CanCtrl_GetWarningLimit | ( | unsigned int | uiInst | ) |
Definition at line 850 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_LeaveListenMode | ( | unsigned int | uiInst | ) |
Definition at line 397 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_LeaveResetMode | ( | unsigned int | uiInst | ) |
Definition at line 126 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_LeaveSelftestMode | ( | unsigned int | uiInst | ) |
Definition at line 450 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_ReceiveMessage | ( | unsigned int | uiInst, |
DRV_CANCTRL_MESSAGE_T * | ptMessage | ||
) |
Definition at line 589 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SendMessage | ( | unsigned int | uiInst, |
DRV_CANCTRL_MESSAGE_T * | ptMessage, | ||
bool | fSingleShot, | ||
bool | fSelfRx | ||
) |
Definition at line 480 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetBaudrate | ( | unsigned int | uiInst, |
uint32_t | ulBaudrate, | ||
unsigned int | uOversampling | ||
) |
Definition at line 152 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetDualAcceptanceFilter | ( | unsigned int | uiInst, |
DRV_CANCTRL_DUALFILTER_T * | ptFilter | ||
) |
Definition at line 284 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetIrqMask | ( | unsigned int | uiInst, |
uint32_t | ulIrqMask | ||
) |
Definition at line 744 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetPrm | ( | unsigned int | uiInst, |
DRV_CANCTRL_PRM_E | ePrmID, | ||
uint32_t | ulPrmVal | ||
) |
Definition at line 965 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetRxErrorCnt | ( | unsigned int | uiInst, |
uint32_t | ulCnt | ||
) |
Definition at line 872 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetSingleAcceptanceFilter | ( | unsigned int | uiInst, |
DRV_CANCTRL_SINGLEFILTER_T * | ptFilter | ||
) |
Definition at line 198 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetTxErrorCnt | ( | unsigned int | uiInst, |
uint32_t | ulCnt | ||
) |
Definition at line 918 of file netx_drv_canctrl.c.
DRV_CANCTRL_RESULT HALDEC() CanCtrl_SetWarningLimit | ( | unsigned int | uiInst, |
uint32_t | ulLimit | ||
) |
Definition at line 826 of file netx_drv_canctrl.c.