ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
<re_irc> <wembly> i'm looking to write a driver that needs an adc, and am trying to understand how to use an adc with embedded-hal, is there an example project somewhere that i can take a look at on how oneshot and channel work?
<re_irc> <jacobrosenthal> wembly: most hals would have one just pick one. Atsamd. Nrf. Stm32
<re_irc> <wembly> jacobrosenthal: that's for implementing it tho? how do i use it in a driver?
<re_irc> <jacobrosenthal> Hals tend to have examples
<re_irc> <dirbaio> I think they want it in a hal-independent driver
<re_irc> <wembly> i'll check it out, tho the hals' ive looked at tend to have examples for using the hal not embedded-hal, but maybe i'm wrong 😅
<re_irc> <wembly> dirbaio: this
<re_irc> <dirbaio> the ADC traits are removed in embedded-hal 1.0 due to some design issues
<re_irc> <dirbaio> pending on a new better design
<re_irc> <wembly> dirbaio: is 1.0 even published yet? last i checked the most recent one was 0.2.7?
<re_irc> <dirbaio> a few aiphas are published
<re_irc> <dirbaio> it'll hopefully be finished and released Soon™
<re_irc> <dirbaio> so it's probably not a good idea to build a HAL-independent driver on the embedded-hal 0.2 ADC traits for now...
<re_irc> <wembly> dirbaio: so basically don't write it for embedded-hal until the ADC design is finalized?
<re_irc> <wembly> got it
<re_irc> <dirbaio> what's the driver you're writing? drivers needing ADC is super rare
<re_irc> <dirbaio> just curious
<re_irc> <wembly> resistive touch screen
<re_irc> <dirbaio> ah! of course
<re_irc> <dirbaio> well
<re_irc> <dirbaio> maybe you could write your own trait, and let the user implement it for their HAL?
<re_irc> <dirbaio> simplest possible trait is
<re_irc> trait AdcChannel
<re_irc> fn read(&mut self) -> Result<u32, Error>;
<re_irc> }
<re_irc> <wembly> i'm honestly surprised there is no driver for it yet
<re_irc> <wembly> i think i'll just start off by writing it for stamd-hal, since i have hardware that uses it, then i'll attempt to make it more generic
<re_irc> <dirbaio> also, input on what trait you tried, and how well it worked/not would be welcome in the ADC trait tracking issue :)
<re_irc> <wembly> dirbaio: to be honest, i can't quite make heads or tails out of it enough to even get started
<re_irc> <dirbaio> what's confusing you? the 0.2 traits?
<re_irc> <firefrommoonlight> wembly: What's the device, and why embedded-hal? The EH traits are too general for effective ADC use
<re_irc> <dirbaio> resistive touch screen
<re_irc> <firefrommoonlight> Oops didn't read all the way
emerent has quit [Ping timeout: 244 seconds]
emerent has joined #rust-embedded
starblue has quit [Ping timeout: 258 seconds]
starblue has joined #rust-embedded
crabbedhaloablut has quit [Remote host closed the connection]
crabbedhaloablut has joined #rust-embedded
explore has quit [Quit: Connection closed for inactivity]
<re_irc> <Lachlan> firefrommoonlight: Because ADCs are generally read with DMA?
<re_irc> <firefrommoonlight> It's a few things. There are usually a lot of device-specific options; continuous reading vs one-shot; how the reads are triggered; DMA (as you said)
<re_irc> <firefrommoonlight> channel sequences etc
<re_irc> <firefrommoonlight> Power management
<re_irc> <firefrommoonlight> How the device indicates a conversion is complete
<re_irc> <firefrommoonlight> How to not block between commanding a conversion adn reading
nort has joined #rust-embedded
emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
causal has quit [Quit: WeeChat 3.5]
nort has left #rust-embedded [I Quit!]
dc740 has joined #rust-embedded
dc740 has quit [Ping timeout: 255 seconds]
dc740 has joined #rust-embedded
lcbit has quit [Ping timeout: 246 seconds]
lcbit has joined #rust-embedded
lcbit has quit [Ping timeout: 258 seconds]
lcbit has joined #rust-embedded
gsalazar has quit [Ping timeout: 240 seconds]
emerent has quit [Remote host closed the connection]
emerent has joined #rust-embedded
aspe has joined #rust-embedded
aspe has quit [Quit: aspe]
aspe has joined #rust-embedded
starblue has quit [Ping timeout: 246 seconds]
aspe has quit [Quit: aspe]
dc740 has quit [Remote host closed the connection]
Foxyloxy has quit [Quit: Textual IRC Client: www.textualapp.com]
dc740 has joined #rust-embedded
Foxyloxy has joined #rust-embedded
<re_irc> <Clark Kozak> I noticed that the Microbit discovery doesn't talk about one of the points it wants to cover:
<re_irc> > Multitasking concepts: cooperative vs preemptive multitasking, interrupts, schedulers, etc.
<re_irc> Did I miss something?
<re_irc> <Clark Kozak> Also, i'm wondering if there are any guides on how to use the GPIO on a microbit with Rust :P
<re_irc> <Clark Kozak> I found the MicroRust book imma play with that
starblue has joined #rust-embedded
<re_irc> <firefrommoonlight> https://www.keil.com/pack/doc/CMSIS/Driver/html/group__eth__interface__gr.html is this useful for ethernet stuff?
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
<re_irc> <James Munns> firefrommoonlight in what way?
aspe has joined #rust-embedded
<re_irc> <dirbaio> huh, that's like CMSIS's equivalent of embedded-hal
aspe has quit [Quit: aspe]
dc740 has quit [Remote host closed the connection]