-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.yml
516 lines (516 loc) · 12.7 KB
/
device.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
%YAML 1.1
---
# yaml-language-server: $schema=https://harp-tech.org/draft-02/schema/device.json
device: Behavior
whoAmI: 1216
firmwareVersion: "3.2"
hardwareTargets: "1.1"
registers:
DigitalInputState:
address: 32
access: Event
type: U8
maskType: DigitalInputs
description: Reflects the state of DI digital lines of each Port
Reserved0: &reserved
address: 33
type: U8
access: Read
description: Reserved for future use
visibility: private
OutputSet: &output
address: 34
type: U16
access: Write
maskType: DigitalOutputs
description: Set the specified digital output lines.
OutputClear:
<<: *output
address: 35
description: Clear the specified digital output lines
OutputToggle:
<<: *output
address: 36
description: Toggle the specified digital output lines
OutputState:
<<: *output
address: 37
description: Write the state of all digital output lines
PortDIOSet: &portDIO
address: 38
type: U8
access: Write
maskType: PortDigitalIOS
description: Set the specified port DIO lines
PortDIOClear:
<<: *portDIO
address: 39
description: Clear the specified port DIO lines
PortDIOToggle:
<<: *portDIO
address: 40
description: Toggle the specified port DIO lines
PortDIOState:
<<: *portDIO
address: 41
description: Write the state of all port DIO lines
PortDIODirection:
<<: *portDIO
address: 42
description: Specifies which of the port DIO lines are outputs
PortDIOStateEvent:
<<: *portDIO
address: 43
access: Event
description: Specifies the state of the port DIO lines on a line change
AnalogData:
address: 44
type: S16
length: 3
access: Event
description: Voltage at the ADC input and encoder value on Port 2
payloadSpec:
AnalogInput0:
offset: 0
description: The voltage at the output of the ADC channel 0.
Encoder:
offset: 1
description: The quadrature counter value on Port 2
AnalogInput1:
offset: 2
description: The voltage at the output of the ADC channel 1.
OutputPulseEnable:
<<: *output
address: 45
description: Enables the pulse function for the specified output lines
PulseDOPort0: &pulseDO
address: 46
type: U16
access: Write
minValue: 1
description: Specifies the duration of the output pulse in milliseconds.
PulseDOPort1:
<<: *pulseDO
address: 47
PulseDOPort2:
<<: *pulseDO
address: 48
PulseSupplyPort0:
<<: *pulseDO
address: 49
PulseSupplyPort1:
<<: *pulseDO
address: 50
PulseSupplyPort2:
<<: *pulseDO
address: 51
PulseLed0:
<<: *pulseDO
address: 52
PulseLed1:
<<: *pulseDO
address: 53
PulseRgb0:
<<: *pulseDO
address: 54
PulseRgb1:
<<: *pulseDO
address: 55
PulseDO0:
<<: *pulseDO
address: 56
PulseDO1:
<<: *pulseDO
address: 57
PulseDO2:
<<: *pulseDO
address: 58
PulseDO3:
<<: *pulseDO
address: 59
PwmFrequencyDO0: &pwmFreq
address: 60
type: U16
access: Write
minValue: 1
description: Specifies the frequency of the PWM at DO0.
PwmFrequencyDO1:
<<: *pwmFreq
address: 61
description: Specifies the frequency of the PWM at DO1.
PwmFrequencyDO2:
<<: *pwmFreq
address: 62
description: Specifies the frequency of the PWM at DO2.
PwmFrequencyDO3:
<<: *pwmFreq
address: 63
description: Specifies the frequency of the PWM at DO3.
PwmDutyCycleDO0: &pwmDutyCycle
address: 64
type: U8
access: Write
minValue: 1
maxValue: 99
description: Specifies the duty cycle of the PWM at DO0.
PwmDutyCycleDO1:
<<: *pwmDutyCycle
address: 65
description: Specifies the duty cycle of the PWM at DO1.
PwmDutyCycleDO2:
<<: *pwmDutyCycle
address: 66
description: Specifies the duty cycle of the PWM at DO2.
PwmDutyCycleDO3:
<<: *pwmDutyCycle
address: 67
description: Specifies the duty cycle of the PWM at DO3.
PwmStart: &pwmStartStop
address: 68
type: U8
access: Write
maskType: PwmOutputs
description: Starts the PWM on the selected output lines.
PwmStop:
<<: *pwmStartStop
address: 69
description: Stops the PWM on the selected output lines.
RgbAll:
address: 70
type: &rgbType U8
length: 6
access: &rgbAccess Write
description: Specifies the state of all RGB LED channels.
payloadSpec:
Green0:
offset: 0
description: The intensity of the green channel in the RGB0 LED.
Red0:
offset: 1
description: The intensity of the red channel in the RGB0 LED.
Blue0:
offset: 2
description: The intensity of the blue channel in the RGB0 LED.
Green1:
offset: 3
description: The intensity of the green channel in the RGB1 LED.
Red1:
offset: 4
description: The intensity of the red channel in the RGB1 LED.
Blue1:
offset: 5
description: The intensity of the blue channel in the RGB1 LED.
Rgb0: &rgbRegister
address: 71
type: *rgbType
length: 3
access: *rgbAccess
description: Specifies the state of the RGB0 LED channels.
interfaceType: RgbPayload
payloadSpec:
Green:
offset: 0
description: The intensity of the green channel in the RGB LED.
Red:
offset: 1
description: The intensity of the red channel in the RGB LED.
Blue:
offset: 2
description: The intensity of the blue channel in the RGB LED.
Rgb1:
<<: *rgbRegister
address: 72
description: Specifies the state of the RGB1 LED channels.
Led0Current: &ledCurrent
address: 73
type: U8
access: Write
minValue: 2
maxValue: 100
description: Specifies the configuration of current to drive LED 0.
Led1Current:
<<: *ledCurrent
address: 74
description: Specifies the configuration of current to drive LED 1.
Led0MaxCurrent: &ledMaxCurrent
address: 75
type: U8
access: Write
minValue: 5
maxValue: 100
description: Specifies the configuration of current to drive LED 0.
Led1MaxCurrent:
<<: *ledMaxCurrent
address: 76
description: Specifies the configuration of current to drive LED 1.
EventEnable:
address: 77
type: U8
access: Write
maskType: Events
description: Specifies the active events in the device.
StartCameras: &cameraControl
address: 78
type: U8
access: Write
maskType: CameraOutputs
description: Specifies the camera outputs to enable in the device.
StopCameras:
<<: *cameraControl
access: [Write, Event]
address: 79
description: Specifies the camera outputs to disable in the device. An event will be issued when the trigger signal is actually stopped being generated.
EnableServos: &servoControl
address: 80
type: U8
access: Write
maskType: ServoOutputs
description: Specifies the servo outputs to enable in the device.
DisableServos:
<<: *servoControl
address: 81
description: Specifies the servo outputs to disable in the device.
EnableEncoders:
address: 82
type: U8
access: Write
maskType: EncoderInputs
description: Specifies the port quadrature counters to enable in the device.
EncoderMode:
address: 83
type: U8
access: Write
maskType: EncoderModeConfig
description: Configures the operation mode of the quadrature encoders.
Reserved2:
<<: *reserved
address: 84
Reserved3:
<<: *reserved
address: 85
Reserved4:
<<: *reserved
address: 86
Reserved5:
<<: *reserved
address: 87
Reserved6:
<<: *reserved
address: 88
Reserved7:
<<: *reserved
address: 89
Reserved8:
<<: *reserved
address: 90
Reserved9:
<<: *reserved
address: 91
Camera0Frame: &frameAcquired
address: 92
type: U8
access: Event
maskType: FrameAcquired
description: Specifies that a frame was acquired on camera 0.
Camera0Frequency: &cameraFreq
address: 93
type: U16
access: Write
minValue: 1
maxValue: 600
description: Specifies the trigger frequency for camera 0.
Camera1Frame:
<<: *frameAcquired
address: 94
description: Specifies that a frame was acquired on camera 1.
Camera1Frequency:
<<: *cameraFreq
address: 95
description: Specifies the trigger frequency for camera 1.
Reserved10:
<<: *reserved
address: 96
Reserved11:
<<: *reserved
address: 97
Reserved12:
<<: *reserved
address: 98
Reserved13:
<<: *reserved
address: 99
ServoMotor2Period: &servoPeriod
address: 100
type: U16
access: Write
minValue: 2
maxValue: 65534
description: Specifies the period of the servo motor in DO2, in microseconds.
ServoMotor2Pulse: &servoPulse
address: 101
type: U16
access: Write
minValue: 6
maxValue: 65530
description: Specifies the pulse of the servo motor in DO2, in microseconds.
ServoMotor3Period:
<<: *servoPeriod
address: 102
description: Specifies the period of the servo motor in DO3, in microseconds.
ServoMotor3Pulse:
<<: *servoPulse
address: 103
description: Specifies the pulse of the servo motor in DO3, in microseconds.
Reserved14:
<<: *reserved
address: 104
Reserved15:
<<: *reserved
address: 105
Reserved16:
<<: *reserved
address: 106
Reserved17:
<<: *reserved
address: 107
EncoderReset:
address: 108
type: U8
access: Write
maskType: EncoderInputs
description: Reset the counter of the specified encoders to zero.
Reserved18:
<<: *reserved
address: 109
EnableSerialTimestamp:
address: 110
type: U8
access: Write
description: Enables the timestamp for serial TX.
MimicPort0IR: &mimic
address: 111
type: U8
access: Write
maskType: MimicOutput
description: Specifies the digital output to mimic the Port 0 IR state.
MimicPort1IR:
<<: *mimic
address: 112
description: Specifies the digital output to mimic the Port 1 IR state.
MimicPort2IR:
<<: *mimic
address: 113
description: Specifies the digital output to mimic the Port 2 IR state.
Reserved20:
<<: *reserved
address: 114
Reserved21:
<<: *reserved
address: 115
Reserved22:
<<: *reserved
address: 116
MimicPort0Valve:
<<: *mimic
address: 117
description: Specifies the digital output to mimic the Port 0 valve state.
MimicPort1Valve:
<<: *mimic
address: 118
description: Specifies the digital output to mimic the Port 1 valve state.
MimicPort2Valve:
<<: *mimic
address: 119
description: Specifies the digital output to mimic the Port 2 valve state.
Reserved23:
<<: *reserved
address: 120
Reserved24:
<<: *reserved
address: 121
PokeInputFilter:
address: 122
type: U8
access: Write
description: Specifies the low pass filter time value for poke inputs, in ms.
bitMasks:
DigitalInputs:
description: Specifies the state of port digital input lines.
bits:
DIPort0: 0x1
DIPort1: 0x2
DIPort2: 0x4
DI3: 0x8
DigitalOutputs:
description: Specifies the state of port digital output lines.
bits:
DOPort0: 0x1
DOPort1: 0x2
DOPort2: 0x4
SupplyPort0: 0x8
SupplyPort1: 0x10
SupplyPort2: 0x20
Led0: 0x40
Led1: 0x80
Rgb0: 0x100
Rgb1: 0x200
DO0: 0x400
DO1: 0x800
DO2: 0x1000
DO3: 0x2000
PortDigitalIOS:
description: Specifies the state of the port DIO lines.
bits:
DIO0: 0x1
DIO1: 0x2
DIO2: 0x4
PwmOutputs:
description: Specifies the state of PWM output lines.
bits:
PwmDO0: 0x1
PwmDO1: 0x2
PwmDO2: 0x4
PwmDO3: 0x8
Events:
description: Specifies the active events in the device.
bits:
PortDI: 0x1
PortDIO: 0x2
AnalogData: 0x4
Camera0: 0x8
Camera1: 0x10
CameraOutputs:
description: Specifies camera output enable bits.
bits:
CameraOutput0: 0x1
CameraOutput1: 0x2
ServoOutputs:
description: Specifies servo output enable bits.
bits:
ServoOutput2: 0x4
ServoOutput3: 0x8
EncoderInputs:
description: Specifies quadrature counter enable bits.
bits:
EncoderPort2: 0x4
FrameAcquired:
description: Specifies that camera frame was acquired.
bits:
FrameAcquired: 0x1
groupMasks:
MimicOutput:
description: Specifies the target IO on which to mimic the specified register.
values:
None: 0
DIO0: 1
DIO1: 2
DIO2: 3
DO0: 4
DO1: 5
DO2: 6
DO3: 7
EncoderModeConfig:
description: Specifies the type of reading made from the quadrature encoder.
values:
Position: 0
Displacement: 1