16 lines
556 B
C
16 lines
556 B
C
#ifndef __CANBUS_H__
|
|
#define __CANBUS_H__
|
|
|
|
#include <stdint.h>
|
|
#include "canbus_registers.h"
|
|
|
|
#define CANBUS_RX_THREAD_STACK_SIZE (512) // Stack size for the CAN RX thread
|
|
#define CANBUS_RX_THREAD_PRIORITY (5) // Priority for the CAN RX thread
|
|
#define CANBUS_RX_MSGQ_SIZE (5) // Size of the message queue for CAN RX thread
|
|
#define CANBUS_TX_TIMEOUT K_MSEC(100) // Timeout for sending CAN messages in milliseconds
|
|
|
|
int canbus_init(void);
|
|
int canbus_send8(uint16_t reg, uint8_t value);
|
|
int canbus_send16(uint16_t reg, uint16_t value);
|
|
|
|
#endif // __CANBUS_H__
|