nrf-rs / nrf-hal

A Rust HAL for the nRF family of devices
Apache License 2.0
504 stars 139 forks source link

SAADC: Multiple channels #82

Open fmckeogh opened 5 years ago

fmckeogh commented 5 years ago

The SAADC can have multiple channels, and starting the sample task will result in all channels being read and DMA'd into memory. This is a useful feature and should probably be exposed somehow, but the specifics need to be discussed.

It would most likely interfere with the embedded-hal OneShot trait, so perhaps a MultiShot trait could be proposed?

The SAADC is also dual-rail, so discussion needs to be had regarding how that should be exposed.

simonsso commented 5 years ago

Because this feature is hardware dependent, it does not have comply with embedded_hal traits, however its naming conversions should be taken into account not to confuse the user. I don't think MultiShot is a descriptive name - I immediately assumed it would be about multiple samples, which is not the case.

It sounds more like a MultiChanelOneShot trait... or something to give the correct associations.

fmckeogh commented 5 years ago

MultiChannelOneShot sounds good to me, MultiShot is already a protocol in the RC world (and now also a Minecraft thing). I've been busy recently, but I'll try and put aside some time to work on this.

huntc commented 3 years ago

Just wondering if there was more thought on this. Is the lack of activity here also related to the utility of multi channel?