Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
freertos/can_ioctl.h
Go to the documentation of this file.
1
34#ifndef _FREERTOS_CAN_IOCTL_H_
35#define _FREERTOS_CAN_IOCTL_H_
36
37#include <stdint.h>
38#ifdef __FreeRTOS__
39#include "freertos/stropts.h"
40#elif defined(ESP_PLATFORM)
41#include "stropts.h"
42#endif
43
44#if defined (__cplusplus)
45extern "C" {
46#endif
47
49#define CAN_IOC_MAGIC ('c')
50
52#define NOTIFIABLE_TYPE 13
53
55#define CAN_IOC_READ_ACTIVE IOW(CAN_IOC_MAGIC, 1, NOTIFIABLE_TYPE)
56
58#define CAN_IOC_WRITE_ACTIVE IOW(CAN_IOC_MAGIC, 2, NOTIFIABLE_TYPE)
59
61typedef uint32_t can_state_t;
62
64#define SIOCGCANSTATE IOR(CAN_IOC_MAGIC, 3, sizeof(can_state_t))
65
67#define CAN_STATE_ACTIVE 0
68
70#define CAN_STATE_BUS_WARNING 1
71
73#define CAN_STATE_BUS_PASSIVE 2
74
76#define CAN_STATE_BUS_OFF 3
77
79#define CAN_STATE_SCANNING_BAUDRATE 4
80
82#define CAN_STATE_STOPPED 5
83
85#define CAN_STATE_SLEEPING 6
86
87#if defined (__cplusplus)
88}
89#endif
90
91#endif /* _FREERTOS_CAN_IOCTL_H_ */
uint32_t can_state_t
CAN state type.