|
HardFOC Core
API reference
|
CANopenNode v4 target definitions for the generic HardFOC driver (CO_driver_hardfoc.c). More...
Go to the source code of this file.
Classes | |
| struct | CO_CANrxMsg_t |
| struct | CO_CANrx_t |
| struct | CO_CANtx_t |
| struct | CO_CANmodule_t |
| struct | CO_storage_entry_t |
Macros | |
| #define | CO_LITTLE_ENDIAN |
| #define | CO_SWAP_16(x) (x) |
| #define | CO_SWAP_32(x) (x) |
| #define | CO_SWAP_64(x) (x) |
| #define | CO_CAN_MAX_LEN HF_CO_CAN_MAX_LEN |
| #define | CO_CANrxMsg_readIdent(msg) ((uint16_t)(((const CO_CANrxMsg_t*)(msg))->ident & 0x07FFU)) |
| #define | CO_CANrxMsg_readDLC(msg) (((const CO_CANrxMsg_t*)(msg))->dlc) |
| #define | CO_CANrxMsg_readData(msg) (((const CO_CANrxMsg_t*)(msg))->data) |
| #define | CO_LOCK_CAN_SEND(CAN_MODULE) hf_co_lock(CAN_MODULE) |
| #define | CO_UNLOCK_CAN_SEND(CAN_MODULE) hf_co_unlock(CAN_MODULE) |
| #define | CO_LOCK_EMCY(CAN_MODULE) hf_co_lock(CAN_MODULE) |
| #define | CO_UNLOCK_EMCY(CAN_MODULE) hf_co_unlock(CAN_MODULE) |
| #define | CO_LOCK_OD(CAN_MODULE) hf_co_lock(CAN_MODULE) |
| #define | CO_UNLOCK_OD(CAN_MODULE) hf_co_unlock(CAN_MODULE) |
| #define | CO_MemoryBarrier() __sync_synchronize() |
| #define | CO_FLAG_READ(rxNew) ((rxNew) != NULL) |
| #define | CO_FLAG_SET(rxNew) |
| #define | CO_FLAG_CLEAR(rxNew) |
Typedefs | |
| typedef uint_fast8_t | bool_t |
| typedef float | float32_t |
| typedef double | float64_t |
Functions | |
| void | hf_co_lock (CO_CANmodule_t *CANmodule) |
| void | hf_co_unlock (CO_CANmodule_t *CANmodule) |
CANopenNode v4 target definitions for the generic HardFOC driver (CO_driver_hardfoc.c).
This directory is on the include path instead of CANopenNode's example/, so the stack picks this file up. It provides:
CO_CAN_MAX_LEN: payload size of the RX/TX buffers, 8 on classic builds and 64 with HF_CO_CAN_FD=1 (nothing above the port binding assumes 8 bytes);hf_co_app_config.h is included first when the application puts one on the include path (HF_CORE_CANOPENNODE_CONFIG_DIR), so its CO_CONFIG_* values win over the module defaults.SPDX-License-Identifier: GPL-3.0-or-later
| #define CO_CAN_MAX_LEN HF_CO_CAN_MAX_LEN |
Payload bytes of every CANopenNode RX/TX buffer.
| #define CO_CANrxMsg_readData | ( | msg | ) | (((const CO_CANrxMsg_t*)(msg))->data) |
| #define CO_CANrxMsg_readDLC | ( | msg | ) | (((const CO_CANrxMsg_t*)(msg))->dlc) |
| #define CO_CANrxMsg_readIdent | ( | msg | ) | ((uint16_t)(((const CO_CANrxMsg_t*)(msg))->ident & 0x07FFU)) |
| #define CO_FLAG_CLEAR | ( | rxNew | ) |
| #define CO_FLAG_READ | ( | rxNew | ) | ((rxNew) != NULL) |
| #define CO_FLAG_SET | ( | rxNew | ) |
| #define CO_LITTLE_ENDIAN |
| #define CO_LOCK_CAN_SEND | ( | CAN_MODULE | ) | hf_co_lock(CAN_MODULE) |
| #define CO_LOCK_EMCY | ( | CAN_MODULE | ) | hf_co_lock(CAN_MODULE) |
| #define CO_LOCK_OD | ( | CAN_MODULE | ) | hf_co_lock(CAN_MODULE) |
| #define CO_MemoryBarrier | ( | ) | __sync_synchronize() |
| #define CO_SWAP_16 | ( | x | ) | (x) |
| #define CO_SWAP_32 | ( | x | ) | (x) |
| #define CO_SWAP_64 | ( | x | ) | (x) |
| #define CO_UNLOCK_CAN_SEND | ( | CAN_MODULE | ) | hf_co_unlock(CAN_MODULE) |
| #define CO_UNLOCK_EMCY | ( | CAN_MODULE | ) | hf_co_unlock(CAN_MODULE) |
| #define CO_UNLOCK_OD | ( | CAN_MODULE | ) | hf_co_unlock(CAN_MODULE) |
| typedef uint_fast8_t bool_t |
| typedef float float32_t |
| typedef double float64_t |
| void hf_co_lock | ( | CO_CANmodule_t * | CANmodule | ) |
Take / release the CANmodule lock (recursive; never held across a blocking call).
| void hf_co_unlock | ( | CO_CANmodule_t * | CANmodule | ) |