shvel-param.h
Go to the documentation of this file.
1 // Copyright (c) 2010-2016 The YP-Spur Authors, except where otherwise indicated.
2 //
3 // Permission is hereby granted, free of charge, to any person obtaining a copy
4 // of this software and associated documentation files (the "Software"), to
5 // deal in the Software without restriction, including without limitation the
6 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7 // sell copies of the Software, and to permit persons to whom the Software is
8 // furnished to do so, subject to the following conditions:
9 //
10 // The above copyright notice and this permission notice shall be included in
11 // all copies or substantial portions of the Software.
12 //
13 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19 // SOFTWARE.
20 
21 #ifndef SHVEL_PARAM_H
22 #define SHVEL_PARAM_H
23 
24 #include <assert.h>
25 
26 typedef union
27 {
28  int integer;
29  char byte[4];
30 } Int_4Char;
31 
32 typedef union _short_2char
33 {
34  short integer;
35  char byte[2];
36 } Short_2Char;
37 
38 // typedef
39 enum
40 {
45  SERVO_LEVEL_POSITION, // not used
47 };
48 
49 typedef enum
50 {
101 
102 #ifdef static_assert
103 static_assert(PARAM_BLOCK0_END <= PARAM_servo, "Parameter enum overwrapped");
104 static_assert(PARAM_BLOCK1_END <= PARAM_io_dir, "Parameter enum overwrapped");
105 static_assert(PARAM_BLOCK2_END <= 255, "Parameter enum overflow");
106 #endif
107 
108 typedef enum
109 {
116 
117 typedef enum
118 {
121  ERROR_HALL_SEQ = 0x0002,
122  ERROR_HALL_ENC = 0x0004,
123  ERROR_WATCHDOG = 0x0008,
124  ERROR_EEPROM = 0x0010,
125  ERROR_INTERNAL = 0x0020,
127 
128 #define MOTOR_ID_BROADCAST 0x7E
129 
130 #endif // SHVEL_PARAM_H
short integer
Definition: shvel-param.h:34
int integer
Definition: shvel-param.h:28
union _short_2char Short_2Char
YPSpur_shvel_param
Definition: shvel-param.h:49
char byte[2]
Definition: shvel-param.h:35
YPSpur_shvel_interrupt
Definition: shvel-param.h:108
YPSpur_shvel_error_state
Definition: shvel-param.h:117


yp-spur
Author(s):
autogenerated on Fri May 7 2021 02:12:17