Skip to content

Commit c3125c7

Browse files
committed
Improve device schema
1 parent 60bb118 commit c3125c7

1 file changed

Lines changed: 45 additions & 42 deletions

File tree

device.yml

Lines changed: 45 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ registers:
3535
offset: 6
3636
Channel7:
3737
offset: 7
38-
DI0State:
38+
DigitalInputState:
3939
address: 34
4040
access: Event
4141
type: U8
42-
maskType: DigitalState
43-
description: Status of the digital input pin 0. An event will be emitted when DI0Trigger == Input.
44-
DO0State:
42+
maskType: DigitalInputs
43+
description: Status of the digital input pin 0. An event will be emitted when DI0Trigger == None.
44+
SyncOutputState:
4545
address: 35
4646
access: Event
4747
type: U8
48-
maskType: DigitalState
48+
maskType: SyncOutputs
4949
description: Status of the digital output pin 0. An periodic event will be emitted when DO0Sync == ToggleEachSecond.
50-
BufferThresholdsState:
50+
BufferThresholdState:
5151
address: 36
5252
access: Read
5353
visibility: private
@@ -66,13 +66,13 @@ registers:
6666
address: 39
6767
access: Write
6868
type: U8
69-
maskType: DI0TriggerConfig
69+
maskType: TriggerConfig
7070
description: Configuration of the digital input pin 0.
7171
DO0Sync:
7272
address: 40
7373
access: Write
7474
type: U8
75-
maskType: DO0SyncConfig
75+
maskType: SyncConfig
7676
description: Configuration of the digital output pin 0.
7777
DO0PulseWidth:
7878
address: 41
@@ -152,7 +152,7 @@ registers:
152152
address: 58
153153
access: Write
154154
type: U8
155-
maskType: ThresholdOnLoadCell
155+
maskType: LoadCellChannel
156156
description: Target Load Cell that will be used to trigger a threshold event on DO1 pin.
157157
DO2TargetLoadCell:
158158
<<: *targetloadcell
@@ -215,69 +215,69 @@ registers:
215215
<<: *thresholdvalue
216216
address: 73
217217
description: Value used to threshold a Load Cell read, and trigger DO8 pin.
218-
DO1BufferRisingEdge: &bufferedthreshold
218+
DO1TimeAboveThreshold: &bufferedthreshold
219219
address: 74
220220
access: Write
221221
type: U16
222222
defaultValue: 0
223223
description: Time (ms) above threshold value that is required to trigger a DO1 pin event.
224-
DO2BufferRisingEdge:
224+
DO2TimeAboveThreshold:
225225
<<: *bufferedthreshold
226226
address: 75
227227
description: Time (ms) above threshold value that is required to trigger a DO2 pin event.
228-
DO3BufferRisingEdge:
228+
DO3TimeAboveThreshold:
229229
<<: *bufferedthreshold
230230
address: 76
231231
description: Time (ms) above threshold value that is required to trigger a DO3 pin event.
232-
DO4BufferRisingEdge:
232+
DO4TimeAboveThreshold:
233233
<<: *bufferedthreshold
234234
address: 77
235235
description: Time (ms) above threshold value that is required to trigger a DO4 pin event.
236-
DO5BufferRisingEdge:
236+
DO5TimeAboveThreshold:
237237
<<: *bufferedthreshold
238238
address: 78
239239
description: Time (ms) above threshold value that is required to trigger a DO5 pin event.
240-
DO6BufferRisingEdge:
240+
DO6TimeAboveThreshold:
241241
<<: *bufferedthreshold
242242
address: 79
243243
description: Time (ms) above threshold value that is required to trigger a DO6 pin event.
244-
DO7BufferRisingEdge:
244+
DO7TimeAboveThreshold:
245245
<<: *bufferedthreshold
246246
address: 80
247247
description: Time (ms) above threshold value that is required to trigger a DO7 pin event.
248-
DO8BufferRisingEdge:
248+
DO8TimeAboveThreshold:
249249
<<: *bufferedthreshold
250250
address: 81
251251
description: Time (ms) above threshold value that is required to trigger a DO8 pin event.
252-
DO1BufferFallingEdge:
252+
DO1TimeBelowThreshold:
253253
<<: *bufferedthreshold
254254
address: 82
255255
description: Time (ms) below threshold value that is required to trigger a DO1 pin event.
256-
DO2BufferFallingEdge:
256+
DO2TimeBelowThreshold:
257257
<<: *bufferedthreshold
258258
address: 83
259259
description: Time (ms) below threshold value that is required to trigger a DO2 pin event.
260-
DO3BufferFallingEdge:
260+
DO3TimeBelowThreshold:
261261
<<: *bufferedthreshold
262262
address: 84
263263
description: Time (ms) below threshold value that is required to trigger a DO3 pin event.
264-
DO4BufferFallingEdge:
264+
DO4TimeBelowThreshold:
265265
<<: *bufferedthreshold
266266
address: 85
267267
description: Time (ms) below threshold value that is required to trigger a DO4 pin event.
268-
DO5BufferFallingEdge:
268+
DO5TimeBelowThreshold:
269269
<<: *bufferedthreshold
270270
address: 86
271271
description: Time (ms) below threshold value that is required to trigger a DO5 pin event.
272-
DO6BufferFallingEdge:
272+
DO6TimeBelowThreshold:
273273
<<: *bufferedthreshold
274274
address: 87
275275
description: Time (ms) below threshold value that is required to trigger a DO6 pin event.
276-
DO7BufferFallingEdge:
276+
DO7TimeBelowThreshold:
277277
<<: *bufferedthreshold
278278
address: 88
279279
description: Time (ms) below threshold value that is required to trigger a DO7 pin event.
280-
DO8BufferFallingEdge:
280+
DO8TimeBelowThreshold:
281281
<<: *bufferedthreshold
282282
address: 89
283283
description: Time (ms) below threshold value that is required to trigger a DO8 pin event.
@@ -288,6 +288,14 @@ registers:
288288
maskType: LoadCellEvents
289289
description: Specifies the active events in the device.
290290
bitMasks:
291+
DigitalInputs:
292+
description: Available digital input lines.
293+
bits:
294+
DI0: 0x1
295+
SyncOutputs:
296+
description: Specifies the state output synchronization lines.
297+
bits:
298+
DO0: 0x1
291299
DigitalOutputs:
292300
description: Specifies the state of port digital output lines.
293301
bits:
@@ -303,28 +311,23 @@ bitMasks:
303311
description: The events that can be enabled/disabled.
304312
bits:
305313
LoadCellData: 0x1
306-
DigitalInput0: 0x2
307-
DigitalOutput0: 0x4
314+
DigitalInput: 0x2
315+
SyncOutput: 0x4
308316
Thresholds: 0x8
309317
groupMasks:
310-
DigitalState:
311-
description: The state of a digital pin.
312-
values:
313-
Low: 0
314-
High: 1
315-
DI0TriggerConfig:
316-
description: Available configurations for when using DI0 as an acquisition trigger.
318+
TriggerConfig:
319+
description: Available configurations when using a digital input as an acquisition trigger.
317320
values:
318-
Input: 0
319-
StartOnRisingEdge: 1
320-
StartOnFallingEdge: 2
321-
DO0SyncConfig:
322-
description: Available configurations when using DO0 pin to report firmware events.
321+
None: 0
322+
RisingEdge: 1
323+
FallingEdge: 2
324+
SyncConfig:
325+
description: Available configurations when using a digital output pin to report firmware events.
323326
values:
324-
Output: 0
325-
ToggleEachSecond: 1
327+
None: 0
328+
Heartbeat: 1
326329
Pulse: 2
327-
ThresholdOnLoadCell:
330+
LoadCellChannel:
328331
description: Available target load cells to be targeted on threshold events.
329332
values:
330333
Channel0: 0

0 commit comments

Comments
 (0)