AllenNeuralDynamics / AllenNeuralDynamics/harp.device.cuttlefish

Interface Overhaul

Open
#31 4 comments 0 reactions 1 assignee Claimed by @Poofjunior View on GitHub
MVP
Dominant language
C#
Stars
0
Forks
2
PR merge metrics
No merged PRs in 30d

Description

To crystallize the overall function of the board, here's a summary:
* general purpose input/output (set/clear groups of pins configured to do so)
* input probing: produce events when specified pins change
* PWM output up to ~1-2KHz

To get there, let's rewrite the interface to reflect the features above and group functionality in the above ordering.

### GPIO Features
* `PortDir`
* `PortState`
* `PortSet`
* `PortClear`

### Edge Event Settings
* `EnableRisingEdgeEvents`
* `EnableFallingEdgeEvents`
* `RisingEdgeEvents`
* `FallingEdgeEvents`

### PWM Settings
* `PWMStart`
* bitmask. writing 1 starts the corresponding pwm output.
* `PWMStop`
* bitmask. writing 1 stops the corresponding pwm output.
* _maybe_: Issue `Event` when a PWM sequence completes if set to issue a finite number of pulses.
* `PWM0Settings`
* `offset_us` (`uint32_t`)
* `on_time_us` (`uint32_t`)
* `off_time_us` (`uint32_t`)
* `inverted` (`uint8_t`)
* ...
* `PWMNSettings`

### Errors
* `ErrorState`
* bitmask. Errors include:
* Schedule cannot keep up with PWM Settings.
* Cannot Dispatch Edge Events to the PC fast enough.
* Device is running in external-io-mode and has no software control of the pins.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.