AllenNeuralDynamics / AllenNeuralDynamics/harp.device.cuttlefish

Interface Overhaul

未关闭
#31 4 条评论 0 个 reaction 已指派 1 人 已被 @Poofjunior 认领 在 GitHub 查看
MVP
主要语言
C#
星标
0
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

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.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。