OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
interface_can_tx_message_handler_t Struct Reference

Dependency-injection interface for the CAN transmit message handlers. More...

Data Fields

bool(* transmit_can_frame )(can_msg_t *can_msg)
 REQUIRED. Write a fully-built can_msg_t to the CAN controller.
 
void(* on_transmit )(can_msg_t *can_msg)
 OPTIONAL. Called immediately after a successful transmission.
 

Detailed Description

Dependency-injection interface for the CAN transmit message handlers.

Provides the hardware transmit callback (REQUIRED) and an optional post-transmit notification callback.

See also
CanTxMessageHandler_initialize

Field Documentation

◆ transmit_can_frame

bool(* transmit_can_frame) (can_msg_t *can_msg)

REQUIRED. Write a fully-built can_msg_t to the CAN controller.

Called after the frame is constructed. The Tx state machine pre-checks buffer availability via is_tx_buffer_empty, so this should normally succeed.

Returns
true on success, false on hardware error.
Note
Must not be NULL.

◆ on_transmit

void(* on_transmit) (can_msg_t *can_msg)

OPTIONAL. Called immediately after a successful transmission.

Useful for counters, LEDs, or protocol analysers. Must execute quickly (microseconds). May be NULL.


The documentation for this struct was generated from the following file:

Copyright (c) 2026 Jim Kueneman all rights reserved. See the License