OpenLcbCLib 1.0 Alpha
OpenSource C Library to create OpenLcb/Lcc Nodes
Loading...
Searching...
No Matches
can_config.h
Go to the documentation of this file.
1
39#ifndef __DRIVERS_CANBUS_CAN_CONFIG__
40#define __DRIVERS_CANBUS_CAN_CONFIG__
41
42#include <stdbool.h>
43#include <stdint.h>
44
45#include "can_types.h"
46
47#ifdef __cplusplus
48extern "C" {
49#endif /* __cplusplus */
50
72 typedef struct {
73
75 bool (*transmit_raw_can_frame)(can_msg_t *can_msg);
76
78 bool (*is_tx_buffer_clear)(void);
79
82 void (*lock_shared_resources)(void);
83
86 void (*unlock_shared_resources)(void);
87
89 void (*on_rx)(can_msg_t *can_msg);
90
92 void (*on_tx)(can_msg_t *can_msg);
93
95 void (*on_alias_change)(uint16_t alias, node_id_t node_id);
96
98
111 extern void CanConfig_initialize(const can_config_t *config);
112
113#ifdef __cplusplus
114}
115#endif /* __cplusplus */
116
117#endif /* __DRIVERS_CANBUS_CAN_CONFIG__ */
void CanConfig_initialize(const can_config_t *config)
Initializes the CAN bus transport layer.
Definition can_config.c:260
Type definitions and constants for the CAN transport layer.
uint64_t node_id_t
48-bit Node ID stored in a 64-bit type (upper 16 bits unused).
Definition openlcb_types.h:359
CAN bus transport configuration.
Definition can_config.h:72
Definition can_types.h:118

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