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
starblue has quit [Ping timeout: 264 seconds]
starblue has joined #rust-embedded
AtleoS has quit [Ping timeout: 268 seconds]
AtleoS has joined #rust-embedded
IlPalazzo-ojiisa has quit [Quit: Leaving.]
mohdrais[m] has joined #rust-embedded
<mohdrais[m]> How to bypass probe-rs?
Noah[m] has joined #rust-embedded
<Noah[m]> <mohdrais[m]> "How to bypass probe-rs?" <- what do you mean? :)
M9names[m] has joined #rust-embedded
<M9names[m]> You can flash code directly by converting your elf file to uf2 if you don't want to use a debugger, no need to use a specific IDE.
<M9names[m]> I still recommend using probe-rs while developing new code though, because it's the most reliable way to deal with panics. There are other strategies, but they are harder to use and can fail on some types of errors
<M9names[m]> (they gave additional context when asking on discord, they want to program a pico W)
<M9names[m]> general process is listed under "Loading a UF2 over USB"
IlPalazzo-ojiisa has joined #rust-embedded
tamme[m] has joined #rust-embedded
<tamme[m]> Hey I recently finished my work on a PR to the ina219 crate. It started out as just adding a way to configure the chip, but ended up more like a rewrite of the driver. I would love any feedback, especially about API design/docs and my build.rs to generate both blocking and sync driver: https://github.com/scttnlsn/ina219/pull/3
xerpi[m] has joined #rust-embedded
<xerpi[m]> When I receive the UART interrupt I read all the data available and push it to the queue. Then I want to wake-up the lower-priority software task to start processing.
<xerpi[m]> Hi! I'm writing an STM32 based RTIC project that uses `heapless::spsc` to pass commands from an UART interrupt handler to a lower priority RTIC software task for later execution.
<xerpi[m]> Would it be a good idea to spawn the task with `handler::spawn().ok()` (since _An attempt to spawn an already spawned task (running) task will result in an error_)? For example, it could happen that while the lower-priority SW task is running a new UART interrupt comes and it preempts the handler so calling `spawn()` again would result in an error.
<dirbaio[m]> You probably want to use an async channel instead of heapless's
<xerpi[m]> Something like this, right?
<dirbaio[m]> So you can make the task do "loop { let data = ch.recv().await; process(data) }`
<dirbaio[m]> So just spawn it once at startup, waiting for data 
<dirbaio[m]> xerpi[m]: > <@xerpi:gnuradio.org> Something like this, right?
<dirbaio[m]> Yep
<xerpi[m]> I was thinking that since my queue has a single consumer and a single producer it would probably be more performant to use an SPSC rather than a MPSC
<dirbaio[m]> It doesn't make much of a difference in practice 
<xerpi[m]> Thank you very much, I'll use an async channel then! 😄
<dirbaio[m]> heapless's is spsc because it does smart lockfree stuff with atomics 
<dirbaio[m]> But if you're then doing an async spawn anyway after, that uses critical section mutexes anyanyway 
<dirbaio[m]> Vs the rtic-sync async channel uses mutexes in the first place for the channel, which allows mpsc "for free" 
<xerpi[m]> I see, so using heapless + spawn would be doing atomic/critical "stuff" twice
RobertJrdens[m] has quit [Quit: Idle timeout reached: 172800s]
JamesMunns[m] has quit [Quit: Idle timeout reached: 172800s]
cesnel[m] has quit [Quit: Idle timeout reached: 172800s]
ello has quit [Quit: ZNC 1.8.2 - https://znc.in]
ello has joined #rust-embedded
beanflame[m] has joined #rust-embedded
<beanflame[m]> hi
<beanflame[m]> 1
<beanflame[m]> Does anyone understand Chinese?
haobogu[m] has joined #rust-embedded
<haobogu[m]> Sure
<haobogu[m]> But it's an English channel
<beanflame[m]> Yes
<beanflame[m]> haobogu[m]: 这里聊
<beanflame[m]> beanflame[m]: 你最近怎么样?
<haobogu[m]> beanflame[m]: 啊?
<beanflame[m]> beanflame[m]: How have you been lately?
<beanflame[m]> beanflame[m]: 你是哪个人?
<beanflame[m]> * 你是哪国人?
<haobogu[m]> beanflame[m]: 你说呢 手动狗头
<beanflame[m]> haobogu[m]: 不就我们也是
<beanflame[m]> beanflame[m]: 为什么你进这里rust频道?
<haobogu[m]> beanflame[m]: 这边基本都是英文聊天,在qq有一个中文Rust嵌入式社区,如果你需要的话可以加 763148381
<beanflame[m]> beanflame[m]: 添加了
<beanflame[m]> beanflame[m]: 你是Jason吗?
<haobogu[m]> beanflame[m]: 🤪
<haobogu[m]> haobogu[m]: 是的
<beanflame[m]> beanflame[m]: 厉害
JamesMunns[m] has joined #rust-embedded
<JamesMunns[m]> By the way if there are any Chinese (or any other language!) chats out there we can point people to, please add them here to this list: https://github.com/rust-embedded/awesome-embedded-rust?tab=readme-ov-file#community-chat-rooms
<beanflame[m]> OK
<beanflame[m]> embedded.rs-wasm-iot - English Telegram chat about Rust and WASM for microcontrollers and IoT?
<haobogu[m]> <JamesMunns[m]> "By the way if there are any..." <- Cool! Will do 😉
cr1901 has quit [Read error: Connection reset by peer]
cr1901 has joined #rust-embedded
ingo[m] has quit [Quit: Idle timeout reached: 172800s]
AdinAck[m] has quit [Quit: Idle timeout reached: 172800s]
IlPalazzo-ojiisa has quit [Quit: Leaving.]
IlPalazzo-ojiisa has joined #rust-embedded
IlPalazzo-ojiisa has quit [Client Quit]