<M9names[m]>
this is true for basically every crate out there. most have at least got examples, even if they don't have any docs.
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
m5zs7k has quit [Ping timeout: 260 seconds]
m5zs7k has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
m5zs7k has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
m5zs7k has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
djdisodo[m] has quit [Quit: Idle timeout reached: 172800s]
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
David[m]12 has joined #rust-embedded
<David[m]12>
I'm using the `singleton!()` macro to create a `&'static mut` of my type in my FW init, and I want to move the ownership of this reference to my IRQ handler. Is there a "best/cleanest" way to achieve this?
pronvis has quit [Ping timeout: 268 seconds]
ryan-summers[m] has quit [Quit: Idle timeout reached: 172800s]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
sourcebox[m] has quit [Quit: Idle timeout reached: 172800s]
<JamesMunns[m]1>
<David[m]12> "I'm using the `singleton..." <- It's difficult for IRQs to "own" anything, as they have no persistent context, and can be called multiple times. Are you using RTIC or Embassy or anything? Or just building the application directly?
<JamesMunns[m]1>
Both Embassy and RTIC provide tools to allow you access to resources, though typically in Embassy the drivers will handle interrupts for you automatically.
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 246 seconds]
pronvis has joined #rust-embedded
thejpster[m] has joined #rust-embedded
<thejpster[m]>
How do I get github to stop pinging me for reviews on rust-embedded repos?
<David[m]12>
<JamesMunns[m]1> "It's difficult for IRQs to "own"..." <- Maybe "own" isn't the best word. I set up and start a peripheral in my init method, giving me `&'static mut T`, and then I want to access that in the IRQ and only the IRQ for the rest of the program
<David[m]12>
David[m]12: I am using Embassy but I am writing my own interrupt handler in this case
<JamesMunns[m]1>
JamesMunns[m]1: David if you think you'd be interested in writing something like that, I can give you some more notes about how I'd do it, and I'd be happy to review the PR for it!
<thejpster[m]>
We know that things like the panic! and write! macros generating some fairly chunky machine code, but that takes up Flash, not RAM. Generally RAM usage isn't too bad.
AtleoS has quit [Ping timeout: 252 seconds]
AtleoS has joined #rust-embedded
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
pbsds3 has quit [Ping timeout: 240 seconds]
pbsds3 has joined #rust-embedded
<Lumpio->
The most complains I've heard about excessive RAM usage in Rust is when people return/move large-ish things on stack and the compiler does not optimize it properly and it allocates like 4x the stack space for copies
<Lumpio->
Flash usage can get a bit out of hand though.
<Lumpio->
Other than that the RAM usage is usually pretty reasonable.
mabez[m] has quit [Quit: Idle timeout reached: 172800s]
vollbrecht[m] has quit [Quit: Idle timeout reached: 172800s]
Danilo[m] has quit [Quit: Idle timeout reached: 172800s]
<barafael[m]>
Curid: Here is an application using embassy to drive an i2c display where a little logo gradually slides from one random location to the next while blinking an led. The target has 2k SRAM and 16k flash (10 Cent MCU by wch). Looking for ideas what else to add to it
pronvis has quit [Remote host closed the connection]
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 264 seconds]
<cr1901>
RobertJrdens[m]: https://docs.rs/idsp/latest/idsp/ Do you provide plain-old "I have a set of coefficients for an FIR filter and I just want to plug those into a struct and call filter()" functionality?
<JamesMunns[m]1>
Robert Jördens ^
<cr1901>
Or alternatively, "I have a set of coefficients for an FIR filter and I cannot be arsed to convert to SOS form"
<cr1901>
(Oh right, SOS form is only for IIR, nvm)
<firefrommoonligh>
So, the scipy.signal.iirfilter gets it in SOS. Then you run the line below to convert to the form the rust libs use
<cr1901>
I have an FIR filter, so SOS doesn't apply
<cr1901>
(AFAICT)
<cr1901>
But I'll keep that in mind for the future. I just ran my stuff thru octave for tonight
<cr1901>
>Do you like Python? <-- I do; I don't care for using numpy/scipy/notebooks unless I'm in the mood to play around for hours (which isn't tonight :P)
pronvis has joined #rust-embedded
pronvis has quit [Ping timeout: 268 seconds]
pronvis has joined #rust-embedded
rmsyn[m] has joined #rust-embedded
<rmsyn[m]>
re: the `Timer` trait, what if we expose two traits `Timer32` and `Timer64` for 32-bit and 64-bit timers, respectively. Then, 32-bit platforms could just implement the `Timer32` trait, and easily wrap `Timer64` to provide a 64-bit interface for drivers. For even smaller platforms, it may make sense to also do a `Timer8` and `Timer16`.
pronvis has quit [Ping timeout: 246 seconds]
<rmsyn[m]>
alternatively, we could do a single `Timer` trait that requires 64-bit interfaces, and auto-implements 8-bit, 16-bit, 32-bit, and 128-bit interfaces
<rmsyn[m]>
then, users could override the other interfaces for more efficient implementations