<re_irc>
<@firefrommoonlight:matrix.org> Went with this syntax:
<re_irc>
<@firefrommoonlight:matrix.org> Keeps the docs and imports more consistent; ie you don't have to worry about which ports you're using; less code to change when you reshuffle pins on new hardware spins etc
<re_irc>
<@firefrommoonlight:matrix.org> let _sck = Pin::new(Port::A, 5, PinMode::Alt(5));
<re_irc>
<@firefrommoonlight:matrix.org> Ie docs now for GPIO module are `Pin` struct, with supporting cfg enums, and fields in that struct's page
<re_irc>
<@grantm11235:matrix.org> I was thinking about how to temporarily switch an spi from 8 bit to 16 bit words, but i think it would also be useful for switching a gpio from input to output and vice versa
<re_irc>
<@firefrommoonlight:matrix.org> Also more consistent with other periph init, ie `StructName::new`
<re_irc>
<@firefrommoonlight:matrix.org> It sounds like that could be a very useful backdoor for more flexibility when using EH traits. I'm not skilled enough with some of the trait magic used in your example to comment on the feasibility and limits
<re_irc>
<@firefrommoonlight:matrix.org> But I see the use case now
<re_irc>
<@firefrommoonlight:matrix.org> Although I wonder if this is a smell from how the word size is specified in the `eh` lib, and implementors, ie forcing you to fix words
<re_irc>
<@firefrommoonlight:matrix.org> I believe you proposed addressing at that level earlier - what was the result?
<re_irc>
<@firefrommoonlight:matrix.org> (Actually, my last comment would apply to the Spi thing, but not GPIO)
<re_irc>
<@grantm11235:matrix.org> That PR does technically limit some flexibility (for good reason imo), I am trying to figure out if I can add some of that flexibility back in a better way
<re_irc>
<@firefrommoonlight:matrix.org> As my project code becomes more complex, little things like API consistency and clarify, breadth of structs, docs etc become more important for keeping things organized
<re_irc>
<@firefrommoonlight:matrix.org> GrantM11235: I really like your reasoning in that PR, especially discussion re 16-bit words over 8-bit interfaces etc. It's nuanced. I don't have a strong opinion on which way you should proceed. Is there a particular driver you're attempting to create or modify that needs this functionality?
<re_irc>
<@grantm11235:matrix.org> When using an SPI LCD, you usually need to convert each 16 bit rgb565 pixel into big-endian bytes
<re_irc>
<@grantm11235:matrix.org> With my example, you can get the same result by temporarily changing the spi to 16 bit mode and sending the pixels as-is
<re_irc>
<@willeml:matrix.org> Does anyone know of a barcode reader library for rust embedded (either supporting an existing barcode scanner module or using a connected camera)
<re_irc>
<@nihal.pasham:matrix.org> I'm working on a driver that writes a `blob of data` to internal flash. I was wondering if `ramfunctions` are necessary for my use-case.
<re_irc>
<@nihal.pasham:matrix.org> - The reference manual for nrf52840 (my board) says `The CPU is halted if the CPU executes code from the flash while the NVMC is writing to the flash.` So, I guess this means it is ok to have `code in flash that writes to flash` i.e. copy data from one location in flash to another. Is my understanding...
<re_irc>
... correct here? I plan to use the nrf52840-hal for NVMC register access and configuration.
<re_irc>
<@dirbaio:matrix.org> > this means it is ok to have code in flash that writes to flash i.e. copy data from one location in flash to another.
<re_irc>
<@dirbaio:matrix.org> Yup! it just runs slower, but it doesn't break
dcz_ has joined #rust-embedded
creich has joined #rust-embedded
dcz_ has quit [Ping timeout: 258 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 268 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 258 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 265 seconds]
<re_irc>
<@hargonix:matrix.org> therealprof: its me again^^ so I've been playing around a bit with the version of microbit that's on git and i notice that when i just compile and flash:
<re_irc>
<@therealprof:matrix.org> hargonix: Yes, very certainly related to the default levels.
<re_irc>
<@thejpster:matrix.org> Is there a document that explains the branch and release model for cortex-m-rt? I'm confused as to where the backports into the 0.6 release series have come from.
<re_irc>
<@henrik_alser:matrix.org> Yeah the schematic confirms this :)
<re_irc>
<@hargonix:matrix.org> henrik_alser: that the default elvels are right? Or that they are wrong?
<re_irc>
<@henrik_alser:matrix.org> hargonix: That they should light up
<re_irc>
<@hargonix:matrix.org> in that case i'll fork quickly and check if i can fix it and shoot you a PR
<re_irc>
<@therealprof:matrix.org> Should be an easy fix.
<re_irc>
<@hargonix:matrix.org> yup works after swapping default levels
<re_irc>
<@adamgreig:matrix.org> thejpster: Master branch contains all merged PRs which currently includes unreleased break-in changes for 0.7, so after the first such breaking change was merged we kept a 0.6.x branch where other changes can be cherrypicked and released as 0.6.12-
<re_irc>
<@adamgreig:matrix.org> So the commits in my 0.6 PR are all from master
<re_irc>
<@thejpster:matrix.org> Ok. Shouldn't master have a 0.7 version number then? And can we write this down somewhere so I don't have to ask again in a month when I've forgotten ;)
<re_irc>
<@adamgreig:matrix.org> Doesn't get bumped until release, in part to make it easier to use patch in cargo but in part because we just don't bump the version number until the release
<re_irc>
<@adamgreig:matrix.org> In this case it's waited an unusually long time to actually get the breaking change released and hence so many backports...
<re_irc>
<@adamgreig:matrix.org> therealprof yay, simd32 type aliases merged into stdsimd
<re_irc>
<@therealprof:matrix.org> Sweet. I had a few more chats on Zulip about adding various other stuff... There's quite some resistence to adding new funtionality "just like that" in a lot of different places. Still trying to figure out the way of least resistence and best order.
<re_irc>
<@thejpster:matrix.org> I had the opposite problem - I couldn't patch because master was older than what was on cargo
<re_irc>
<@willeml:matrix.org> Does anyone know of an rp2040 spi example?
<re_irc>
<@therealprof:matrix.org> willeml: I think dirbaio has recently worked on getting a ST7789 SPI display running at warp speed.
<re_irc>
<@willeml:matrix.org> (I know it's still wip, but the PR to add it in the hal mentions that they got an SPI oled display working)
<re_irc>
<@willeml:matrix.org> therealprof: Hmm, do you know if the code is public? Ill just search github
<re_irc>
<@therealprof:matrix.org> No idea, but pretty sure you might get an answer soon. 😉
<re_irc>
<@willeml:matrix.org> Based on looking at github repos on profile, looks like not
<re_irc>
<@therealprof:matrix.org> adamgreig: It's really curious that quite a few ARM instructions are not really used, like `SSAT` and `USAT`. I'm still struggling a bit to generate the correct patterns in LLVM, they're quite complex and the generation of immediate values to go into the instructions is anything but well documented.
<re_irc>
<@willeml:matrix.org> I guess I have to switch to embassy
<re_irc>
<@willeml:matrix.org> Is there an advantage to embassy over "normal" hal like stm32f7xx-hal?
<re_irc>
<@dirbaio:matrix.org> I have the display one around too but it's using a whacky half-upgraded to e-g 0.7 fork of st7789, I should switch it back now that the author beat me to upgrading it haha
<re_irc>
<@dirbaio:matrix.org> hm
<re_irc>
<@dirbaio:matrix.org> async support (optional though, you can also use blocking i/o with embedded-hal), imo nicer/simpler api (much less generics and typestates), consistent API for all chips
<re_irc>
<@dirbaio:matrix.org> much faster builds due to stm32xxx-hals using too many macros
<re_irc>
<@dirbaio:matrix.org> stm32 is very work in progress though
<re_irc>
<@dirbaio:matrix.org> most of the basics (uart/spi/i2c) are done with blocking e-h apis, lately there's been lots of work on DMA to allow async apis too
<re_irc>
<@willeml:matrix.org> I wonder how hard it would be to port the fmc display over to embassy
<re_irc>
<@willeml:matrix.org> Oh yay, I can use my extra pico as a debugger
<re_irc>
<@ubik:matrix.org> newam: I believe this is what success looks like 😀
<re_irc>
<@ubik:matrix.org> still not sure why the ISR doesn't fire though 🤔
<re_irc>
<@ubik:matrix.org> i've enabled it in the NVIC
<re_irc>
<@almindor:matrix.org> > I have the display one around too but it's using a whacky half-upgraded to e-g 0.7 fork of st7789, I should switch it back now that the author beat me to upgrading it haha
<re_irc>
<@almindor:matrix.org> does embassy not "just work" with the default ST7789?
<re_irc>
<@dirbaio:matrix.org> Yea it does, I'm referring to the e-g upgrade
<re_irc>
<@dirbaio:matrix.org> When I did it, St7789 was still on eg 0.6 and I esnted 0.7
<re_irc>
<@almindor:matrix.org> ah yeah sorry, I didn't have any hw left to try on, I botched my pinetime and waited for the new red-v for ages
<re_irc>
<@dirbaio:matrix.org> But the spi part just worked thanks to the e-h traits yup
synack has left #rust-embedded [#rust-embedded]
<re_irc>
<@willeml:matrix.org> Is it possible to use the rp2040 version of probe-rs and probe-run with picoprobe?
<re_irc>
<@adamgreig:matrix.org> i don't believe so, picoprobe uses its own custom USB protocol (instead of say implementing the standard cmsis-dap one), which probe-rs doesn't speak
<re_irc>
<@adamgreig:matrix.org> though i recall some people talking about either modifying picoprobe to use cmsis-dap or probe-rs to learn picoprobe, and you can certainly get some firmware for a pico that talks cmsis-dap instead
<re_irc>
<@adamgreig:matrix.org> (so you can use a pico as a probe with probe-rs)
<re_irc>
<@therealprof:matrix.org> Yeah, there is a CMSIS-DAP implementation for the Pico though.
<re_irc>
<@willeml:matrix.org> Argh, pico-debug does it, and you dont need the other pi to be connected, oh well, that was a large waste of time soldering stuff together because I don't have proper jumper cables...
<re_irc>
<@willeml:matrix.org> I should have asked first lol
<re_irc>
<@therealprof:matrix.org> willeml: Yes, that's the one. I've distributed a .uf2 binary a while ago since building wasn't superefficient. Not sure what has happened to the code since then.
<re_irc>
<@willeml:matrix.org> Do you still have that binary?
<re_irc>
<@willeml:matrix.org> Because (like it was building picoprobe) the building seems complicated, and also, even with gigabit internet, its still taking over 5 minutes to clone the git repos
<re_irc>
<@willeml:matrix.org> Awesome, thank you, you still beat the git clone even though it had a 5 minute head start lol
<re_irc>
<@therealprof:matrix.org> Yeah, I had the same experience, that's why I shared the binary. Use at your own risk. 😉
<re_irc>
<@therealprof:matrix.org> I'm also not sure how much of the probe-rs changes have been upstreamed already.
<re_irc>
<@willeml:matrix.org> Well, that uf2 + rp-probe-run worked to flash blinky
<re_irc>
<@willeml:matrix.org> so I am happy
<re_irc>
<@therealprof:matrix.org> My last status was that you need to use the fork to talk to the Pico since it's using a rare mutlidrop SWD implementation.
<re_irc>
<@therealprof:matrix.org> Cool.
<re_irc>
<@willeml:matrix.org> Very slow to flash though, and I think rtt might be not working, though I probably just don't have it configured right
<re_irc>
<@dkhayes117:matrix.org> Its been a while since I've used my Hifive1, and I am going insane with this error. What am I missing here? I get an error with `cargo run --example pmp_methods
<re_irc>
<@dkhayes117:matrix.org> Finished dev [unoptimized + debuginfo] target(s) in 0.02s
<re_irc>
<@dkhayes117:matrix.org> error: could not execute process `riscv64-unknown-elf-gdb -q -x gdb_init target/riscv32imac-unknown-none-elf/debug/examples/pmp-methods` (never executed)