-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.yml
106 lines (105 loc) · 2.84 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
%YAML 1.1
---
# yaml-language-server: $schema=https://harp-tech.org/draft-02/schema/device.json
device: AudioSwitch
whoAmI: 1248
firmwareVersion: "1.2"
hardwareTargets: "1.0"
registers:
ControlMode:
address: 32
access: Write
type: U8
maskType: ControlSource
description: Configures the source to enable the board channels.
EnableChannels:
address: 33
access: [Write, Event]
type: U16
maskType: AudioChannels
description: Enables the audio output channels using a bitmask format. An event will be emitted when any of the channels are enabled.
DigitalInputState:
address: 34
access: Event
type: U8
maskType: DigitalInputs
description: State of the digital input pins. An event will be emitted when the value of any digital input pin changes.
DO0State:
address: 35
access: Write
type: U8
maskType: EnableFlag
description: Status of the digital output pin 0.
Reserved0: &reserved
address: 36
access: Read
visibility: private
type: U8
description: Reserved for future use.
DI4Trigger:
address: 37
access: Write
type: U8
maskType: DI4TriggerConfig
description: Configuration of the digital input pin 4 functionality.
DO0Sync:
address: 38
access: Write
type: U8
maskType: DO0SyncConfig
description: Configuration of the digital output pin 0 functionality.
EnableEvents:
address: 39
access: Write
type: U8
maskType: AudioSwitchEvents
description: Specifies the active events in the device.
bitMasks:
AudioChannels:
description: Specifies the available audio output channels.
bits:
Channel0: 0x1
Channel1: 0x2
Channel2: 0x4
Channel3: 0x8
Channel4: 0x10
Channel5: 0x20
Channel6: 0x40
Channel7: 0x80
Channel8: 0x100
Channel9: 0x200
Channel10: 0x400
Channel11: 0x800
Channel12: 0x1000
Channel13: 0x2000
Channel14: 0x4000
Channel15: 0x8000
DigitalInputs:
description: Specifies the state of the digital input pins.
bits:
DI0: 0x1
DI1: 0x2
DI2: 0x4
DI3: 0x8
DI4: 0x10
AudioSwitchEvents:
description: The events that can be enabled/disabled.
bits:
EnableChannels: 0x1
DigitalInputsState: 0x2
groupMasks:
ControlSource:
description: Available configurations to control the board channels (host computer or digital inputs).
values:
USB: 0
DigitalInputs: 1
DI4TriggerConfig:
description: Available configurations for DI4. Can be used as digital input or as the MSB of the switches address when the SourceControl is configured as DigitalInputs.
values:
Input: 0
Address: 1
DO0SyncConfig:
description: Available configurations when using DO0 pin to report firmware events.
values:
Output: 0
ToggleOnChannelChange: 1