|
OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
|
CAN bus transport configuration. More...
Data Fields | |
| bool(* | transmit_raw_can_frame )(can_msg_t *can_msg) |
| Transmit a raw CAN frame. REQUIRED. | |
| bool(* | is_tx_buffer_clear )(void) |
| Check if CAN TX hardware buffer can accept another frame. REQUIRED. | |
| void(* | lock_shared_resources )(void) |
| Disable interrupts / acquire mutex for shared resource access. REQUIRED. Same function as openlcb_config_t.lock_shared_resources. | |
| void(* | unlock_shared_resources )(void) |
| Re-enable interrupts / release mutex. REQUIRED. Same function as openlcb_config_t.unlock_shared_resources. | |
| void(* | on_rx )(can_msg_t *can_msg) |
| Called when a CAN frame is received. Optional. | |
| void(* | on_tx )(can_msg_t *can_msg) |
| Called when a CAN frame is transmitted. Optional. | |
| void(* | on_alias_change )(uint16_t alias, node_id_t node_id) |
| Called when a node's CAN alias changes. Optional. | |
CAN bus transport configuration.
Users provide their hardware-specific CAN driver functions here. All other CAN-internal wiring is handled automatically.
Example:
| bool(* transmit_raw_can_frame) (can_msg_t *can_msg) |
Transmit a raw CAN frame. REQUIRED.
| bool(* is_tx_buffer_clear) (void) |
Check if CAN TX hardware buffer can accept another frame. REQUIRED.
| void(* lock_shared_resources) (void) |
Disable interrupts / acquire mutex for shared resource access. REQUIRED. Same function as openlcb_config_t.lock_shared_resources.
| void(* unlock_shared_resources) (void) |
Re-enable interrupts / release mutex. REQUIRED. Same function as openlcb_config_t.unlock_shared_resources.
| void(* on_rx) (can_msg_t *can_msg) |
Called when a CAN frame is received. Optional.
| void(* on_tx) (can_msg_t *can_msg) |
Called when a CAN frame is transmitted. Optional.
| void(* on_alias_change) (uint16_t alias, node_id_t node_id) |
Called when a node's CAN alias changes. Optional.
Copyright (c) 2026 Jim Kueneman all rights reserved. See the License