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
radens has joined #rust-embedded
starblue1 has quit [Ping timeout: 272 seconds]
starblue1 has joined #rust-embedded
radens has quit [Quit: Connection closed for inactivity]
cr1901 has quit [Ping timeout: 240 seconds]
cr1901 has joined #rust-embedded
gsalazar has joined #rust-embedded
gsalazar_ has joined #rust-embedded
gsalazar has quit [Ping timeout: 272 seconds]
gsalazar_ has quit [Quit: Leaving]
<re_irc> <barafael> calling for volunteers who own stm32l0/stm32l4 devices :) if you have some time, could you test if https://github.com/barafael/rtic-examples/tree/master/rtic_v1/stm32l0_monotonic and https://github.com/barafael/rtic-examples/tree/master/rtic_v1/stm32l4_heartbeat work and do the right thing? I ported them to RTIC v1 but cannot test as I don't have the hardware.
<re_irc> <burrbull> barafael: It would be much more better if you add those implementations to HALs directly.
<re_irc> <barafael> burrbull: they are all living inside rtic-examples repo and I just took them from v0.5 to v1. I'm just random contributor. Maybe the examples should be in the HALs, I don't know
<re_irc> <barafael> but I think may be good to have one place with some RTIC examples on different targets
<re_irc> <burrbull> usage examples yes, but they should not content monotonic implementations which must be in hals
<re_irc> <barafael> ok, good point. So the monotonic impls should go in the HALs behind some feature gate, which makes sense
starblue1 has quit [Ping timeout: 240 seconds]
starblue1 has joined #rust-embedded
gsalazar has joined #rust-embedded
sheb has joined #rust-embedded
sheb has quit [Remote host closed the connection]
<re_irc> <chmanie> James Munns, dirbaio: Here's my preliminary approach for the MAX11300 driver using typestate. I'm making having use of seq_macro for the port mode structs and the trait implementations that are very repetitive. For the SPI bus I'm using a simple RefCell holding the shared struct. The only thing I'm not super happy with is the code repetition of the individual port configurations after the fact ("configure_xxx"). I...
<re_irc> ... refrained from implementing the typestate transitions for now as that's something that in practise rarely happens. Here's the code: https://gist.github.com/chmanie/abe818ba291609dacbd8d0a4f9775969
<re_irc> <chmanie> Let me know what you think!
<re_irc> <James Munns> Oh neat! I hadn't seen that seq! Macro before!
<re_irc> <chmanie> Maybe there's a better way but it did seem appropriate
<re_irc> <chmanie> James Munns, dirbaio: Here's my preliminary approach for the MAX11300 driver using typestate. I'm making heavy use of "seq_macro" for the port mode structs and the trait implementations that are very repetitive. For the SPI bus I'm using a simple RefCell holding the shared struct. The only thing I'm not super happy with is the code repetition of the individual port configurations after the fact ("configure_xxx"). I...
<re_irc> ... refrained from implementing the typestate transitions for now as that's something that in practise rarely happens. Here's the code: https://gist.github.com/chmanie/abe818ba291609dacbd8d0a4f9775969
<re_irc> <James Munns> Gunna stream some more Splitpea development (with "pretty HAL machine"!), today at 18:00 CET (a bit over 30m from now): https://youtu.be/EughbCeVVxw, come hang out and say hi :D
<re_irc> <James Munns> (pretty HAL machine is a tool for proxying "embedded-hal" commands to an attached USB device, instead of flashing/reflashing a firmware while developing a driver. More info here: https://github.com/jamesmunns/pretty-hal-machine)
jackneill has quit [Remote host closed the connection]
jackneill has joined #rust-embedded
<re_irc> <James Munns> Starting the stream now :D
<re_irc> <henrik_alser> James Munns: Catching up on the stream now :D
<re_irc> Whatever I do with the DWT peripheral, I always get 1073741824 when I call get_cycle_count(), which is 0x4000_0000
<re_irc> <Mehmet Ali> I am trying to count how many cycles a function takes.
<re_irc> <Mehmet Ali> I tried the core peripheral from nrf52840_pac like this:
<re_irc> use nrf52840_hal:: {
<re_irc> #...
<re_irc> };
<re_irc> pac::DWT,
<re_irc> <Mehmet Ali> I tried the core peripheral from nrf52840_pac like this:
<re_irc> use nrf52840_hal:: {
<re_irc> pac::DWT,
<re_irc> #...
<re_irc> <Mehmet Ali> I tried the core peripheral from nrf52840_pac like this:
<re_irc> use nrf52840_hal:: {
<re_irc> #...
<re_irc> pac::DWT,
<re_irc> <Mehmet Ali> I tried the equivalent with the cortex_m crate.
<re_irc> <Mehmet Ali> Am I missing sth obvious? Is it the belgian ale?
<re_irc> <adamgreig> Check the docs for enable_cycle_counter, iirc you have to enable_trace also
cr1901_ has joined #rust-embedded
cr1901_ has quit [Remote host closed the connection]
cr1901_ has joined #rust-embedded
<re_irc> <vdkj> With your help I have made most of the changes that were suggested in the initial review of the code here: https://github.com/jvanderk/syd-siderial_tracker/blob/main/src/bin/syd.rs .
<re_irc> One remark was to split the code into modules. I've made an initial attempt at that but ran into a number of issues, mostly scope related. I started in https://doc.rust-lang.org/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html but would really like to see an example setup...
cr1901 has quit [Ping timeout: 240 seconds]
cr1901_ has quit [Remote host closed the connection]
cr1901_ has joined #rust-embedded
cr1901_ has quit [Remote host closed the connection]
cr1901_ has joined #rust-embedded
<re_irc> <vdkj> With your help I have made most of the changes that were suggested in the initial review of the code here: https://github.com/jvanderk/syd-siderial_tracker/blob/main/src/bin/syd.rs .
<re_irc> One remark was to split the code into modules. I've made an initial attempt at that but ran into a number of issues, mostly scope related. I started in https://doc.rust-lang.org/book/ch07-00-managing-growing-projects-with-packages-crates-and-modules.html but would really like to see an example setup...
<re_irc> One example:
<re_irc> mod rate {