-
Notifications
You must be signed in to change notification settings - Fork 119
Hardware Library Guidelines
Provide the very basic device descriptor with xxx-device
node producing a custom-typed DEV
output
Create action nodes for various aspects of the device
Do not place much magic behind action nodes. Offload throttling, checking, protection to other levels.
Provide straightforward DO
/DONE
pulses that just force the action execution
For action nodes chain DEV
to DEV'
If an action is a long-running process provide MUX
and MUX'
pins to explicitly pass a mutex to lock
Create quickstart nodes for the most common usage scenarios with the simplest interface possible.
Decompose the device custom type to plain port and configuration parameter pins.
If the function managed by an actuator quickstart node is idempotent (e.g. LED, servo, text LCD), use boolean ACT
for control; otherwise, use pulse UPD
.
If the function managed by a sensor quickstart node presumes fast polling (e.g. button, encoder), use boolean ACT
for control; otherwise, use pulse UPD
.
Provide output counterparts for control inputs:
-
ACT
→ACK
(a hook to handle errors) -
UPD
→OK
(may be a part of an imperative chain)
If the hardware cannot execute an action reliably with an arbitrary rate, place throttle
inside its quickstart node.