mcuTypes.h
Go to the documentation of this file.
1 
4 
6 #pragma once
7 
8 namespace dpyMcu {
9 
11 enum CanStatus {
12  TX_BUSY = 0,
13  TX_IDLE = 1,
14  RX_BUSY = 2,
15  RX_IDLE = 3,
28  ERROR_STATUS = 16,
29  UNHANDLED = 17
30 };
31 
34  std::string timestamp = "";
36 };
37 
40 {
41  uint32_t timestamp;
43  bool is_remote;
44  bool is_ext;
45  bool is_error;
46  uint32_t id;
47  uint32_t data_size;
48  std::string data;
49 };
50 
51 // CAN bus frame type
52 enum CANBusIdType
53 {
54  STANDARD = 0, //<! Standard frame
55  EXTENDED = 1, //<! Extended frame
56 };
57 
58 // Can bus filter structure
60 {
61  CANBusIdType id_type; //<! CAN bus frame type
62  uint32_t can_id; //<! CAN Bus ID
63  uint32_t can_mask; //<! CAN Bus Mask
64 };
65 
68  uint32_t baudrate;
69 };
70 
73  RS485 = 0,
74  RS232 = 1,
75 };
76 
77 }
std::string data
CAN Frame data.
Definition: mcuTypes.h:48
Definition: mcuTypes.h:59
Rx FIFO 1 fill level reached watermark.
Definition: mcuTypes.h:23
It contains the current CAN Bus status defined in its timestamp.
Definition: mcuTypes.h:33
CanStatus status
Status.
Definition: mcuTypes.h:35
uint32_t timestamp
Frame timestamp.
Definition: mcuTypes.h:41
New message written to Rx FIFO 1.
Definition: mcuTypes.h:21
bool is_ext
Frame type (STD or EXT)
Definition: mcuTypes.h:44
CanStatus
Different CAN Bus tatus.
Definition: mcuTypes.h:11
Rx FIFO 0 full.
Definition: mcuTypes.h:19
Rx Buffer is Idle.
Definition: mcuTypes.h:15
Rx FIFO 0 fill level reached watermark.
Definition: mcuTypes.h:18
bool is_error
CAN Frame Error State Indicator.
Definition: mcuTypes.h:45
Rx FIFO 1 is Idle.
Definition: mcuTypes.h:22
Rx FIFO 1 full.
Definition: mcuTypes.h:24
New message written to Rx FIFO 0.
Definition: mcuTypes.h:16
Rx Buffer is Busy.
Definition: mcuTypes.h:14
UnHadled Interrupt asserted.
Definition: mcuTypes.h:29
uint32_t baudrate
CAN bus Baudrate.
Definition: mcuTypes.h:68
Deepsy Mcu namespace that includes the different enums, structs or method signatures that should be u...
Definition: mcuApi.h:15
Rx FIFO 0 message lost.
Definition: mcuTypes.h:20
SerialPortProtocol
Serial Ports Protocol.
Definition: mcuTypes.h:72
bool is_remote
Frame type (DATA or REMOTE)
Definition: mcuTypes.h:43
CAN BUS configuration structure.
Definition: mcuTypes.h:67
It contains the CAN Bus Frame structure.
Definition: mcuTypes.h:39
Rx FIFO 1 message lost.
Definition: mcuTypes.h:25
std::string timestamp
Timestamp.
Definition: mcuTypes.h:34
Rx FIFO 0 is busy.
Definition: mcuTypes.h:26
CanStatus status
Can current status.
Definition: mcuTypes.h:42
uint32_t id
CAN Frame ID field.
Definition: mcuTypes.h:46
232
Definition: mcuTypes.h:74
Tx Buffer is Busy.
Definition: mcuTypes.h:12
Tx Buffer is Idle.
Definition: mcuTypes.h:13
uint32_t data_size
CAN Frame data size.
Definition: mcuTypes.h:47
Rx FIFO 1 is busy.
Definition: mcuTypes.h:27
Rx FIFO 0 is Idle.
Definition: mcuTypes.h:17
MCAN Module Error and Status.
Definition: mcuTypes.h:28
485
Definition: mcuTypes.h:73