Open FFBoard
Open source force feedback firmware
ClassIDs.h
Go to the documentation of this file.
1
/*
2
* ClassIDs.h
3
*
4
* Created on: 23.11.2021
5
* Author: Yannick
6
*/
7
8
#ifndef USEREXTENSIONS_INC_CLASSIDS_H_
9
#define USEREXTENSIONS_INC_CLASSIDS_H_
10
#include <stdint.h>
11
// Type IDs
12
enum class
ClassType
: uint16_t {
13
NONE
=0,
14
Mainclass
=1,
15
Internal
=2,
16
Motordriver
=3,
17
Buttonsource
=4,
18
Analogsource
=5,
19
Encoder
=6,
20
Axis
=7,
21
Extension
=8,
22
Port
=9
23
};
24
25
// Mainclasses all have the name "main" in the commandhandler system for addressing and ID 0 but can have different display names
26
// Other classes will use their unique ID in the command system
27
#define CMDCLSID_MAIN 0x01
28
#define CMDCLSTR_MAIN "main"
29
30
// The main command system can control the board independently.
31
#define CMDCLSID_SYS 0x00
32
#define CMDCLSTR_SYS "sys"
33
34
35
36
// Unique class IDs. 16 bits (0xFFFF max)
37
#define CLSID_NONE 0
// Undefined IDs or failsafe main
38
#define CLSID_MAIN_FFBWHEEL 0x1
39
#define CLSID_MAIN_FFBJOY 0x2
40
#define CLSID_MAIN_FFBEXT 0x3
41
#define CLSID_MAIN_TMCDBG 0xB
42
#define CLSID_MAIN_CAN 0xC
43
#define CLSID_MAIN_MIDI 0xD
44
#define CLSID_SYSTEM 0x10
// sys main command thread
45
#define CLSID_ERRORS 0x11
46
47
// Button sources for gamepad
48
#define CLSID_BTN_NONE 0x20
49
#define CLSID_BTN_LOCAL 0x21
50
#define CLSID_BTN_SPI 0x22
51
#define CLSID_BTN_SHIFTER 0x23
52
#define CLSID_BTN_PCF 0x24
53
#define CLSID_BTN_CAN 0x25
54
55
56
// Analog sources
57
#define CLSID_ANALOG_NONE 0x40
58
#define CLSID_ANALOG_LOCAL 0x41
59
#define CLSID_ANALOG_CAN 0x42
60
#define CLSID_ANALOG_ADS111X 0x43
61
62
// Encoders
63
#define CLSID_ENCODER_NONE 0x60
64
#define CLSID_ENCODER_LOCAL 0x61
65
#define CLSID_ENCODER_MTSPI 0x62
66
#define CLSID_ENCODER_BISS 0x63
67
#define CLSID_ENCODER_SSI 0x64
68
69
// Motordrivers
70
#define CLSID_MOT_NONE 0x80
71
#define CLSID_MOT_TMC0 0x81
72
#define CLSID_MOT_TMC1 0x82
73
#define CLSID_MOT_TMC2 0x83
74
#define CLSID_MOT_PWM 0x84
75
#define CLSID_MOT_ODRV0 0x85
76
#define CLSID_MOT_ODRV1 0x86
77
#define CLSID_MOT_VESC0 0x87
78
#define CLSID_MOT_VESC1 0x88
79
#define CLSID_MOT_SM1 0x89
80
#define CLSID_MOT_SM2 0x8A
81
#define CLSID_MOT_RMD1 0x8B
82
#define CLSID_MOT_RMD2 0x8C
83
84
// Internal classes
85
#define CLSID_AXIS 0xA01
86
#define CLSID_EFFECTSCALC 0xA02
87
#define CLSID_EFFECTSMGR 0xA03
88
89
#define CLSID_CANPORT 0xC01
90
#define CLSID_I2CPORT 0xC02
91
92
#define CLSID_CUSTOM 0x539
// Reserved for testing
93
94
#endif
/* USEREXTENSIONS_INC_CLASSIDS_H_ */
ClassType
ClassType
Definition:
ClassIDs.h:12
ClassType::Motordriver
@ Motordriver
ClassType::Mainclass
@ Mainclass
ClassType::Analogsource
@ Analogsource
ClassType::Port
@ Port
ClassType::Extension
@ Extension
ClassType::Internal
@ Internal
ClassType::Buttonsource
@ Buttonsource
CommandReplyType::NONE
@ NONE
Axis
Definition:
Axis.h:99
Encoder
Definition:
Encoder.h:29
Firmware
FFBoard
UserExtensions
Inc
ClassIDs.h
Generated by
1.9.2