-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
proposalRequest for a new featureRequest for a new feature
Description
Specifically in this generation step:
reflex-generator/interface/Device.tt
Line 535 in de85b82
| var memberIndexer = member.Value.Offset.HasValue ? $"[{member.Value.Offset}]" : string.Empty; |
The advantage would be allowing reusable payloadSpec definitions shared across registers where one is single value and the other is array.
For example, in the below, StartPulseTrain could be defined by reusing the definition in StartPulse:
StartPulse:
address: 37
type: U16
access: Write
description: Starts a single pulse on the specified digital output line.
payloadSpec: &pulse
DigitalOutput:
offset: 0
mask: 0xC00
maskType: PwmOutput
description: Specifies the digital output line on which to run each pulse.
PulseWidth:
offset: 0
mask: 0x3FF
interfaceType: ushort
description: Specifies the duration in milliseconds that each pulse is HIGH.
StartPulseTrain:
address: 38
type: U16
length: 2
access: Write
description: Starts a pulse train on the specified digital output line.
payloadSpec:
<<: *pulse
Frequency:
offset: 1
mask: 0xFF00
minValue: 1
maxValue: 255
defaultValue: 1
interfaceType: byte
description: Specifies the rate in Hz of the pulses in the PWM pulse train.
PulseCount:
offset: 1
mask: 0xFF
interfaceType: byte
description: Specifies the number of pulses in the PWM pulse train. A value of zero signifies an infinite pulse train.Metadata
Metadata
Assignees
Labels
proposalRequest for a new featureRequest for a new feature