<re_irc>
<@laura7089:matrix.org> Is there a way to get "eh" alpha-compatible stuff out of the "cortex-m" crate?
<re_irc>
<@dirbaio:matrix.org> what do you mean with "get stuff"? :)
<re_irc>
<@laura7089:matrix.org> I'm developing a driver for an altimeter, and the only hardware I have for it has it soldered to a board with an RP2040, so my "self-tests" test sub-crate for on-device testing relies on "cortex-m" to create a "Delay" object to wait for the altimeter's boot-up time and sample time, but the altimeter driver is targeting the latest "embedded-hal" alpha whereas "cortex-m" is using the non-alpha releases, so getting it to work...
<re_irc>
... previously used "embedded-hal-compat" to glue them together, but that's fallen out of step with the latest eh alphas
<re_irc>
<@laura7089:matrix.org> So I thought I'd ask if there's a way to cut out the middle man and get compatible delays directly from "cortex-m"
<re_irc>
<@laura7089:matrix.org> I don't actually have any functions in the driver expecting a delay though, only in the tests, so I suppose I could depend on two different versions of EH and rename one (does rust let me do that?)
<re_irc>
<@dirbaio:matrix.org> ahhhokay
<re_irc>
<@dirbaio:matrix.org> yes, cortex-m doesn't support the alphas
<re_irc>
<@firefrommoonlight:matrix.org> I would set up the altimeter in a way so that's not required
<re_irc>
<@dirbaio:matrix.org> > I could depend on two different versions of EH and rename one (does rust let me do that?)
<re_irc>
yep, you can do it like this:
<re_irc>
embedded-hal-02 = { package = "embedded-hal", version = "0.2.6", features = ["unproven"] }
<re_irc>
<@dirbaio:matrix.org> from the code use "embedded_hal_02" or "embedded_hal_1"
<re_irc>
<@firefrommoonlight:matrix.org> Make a setup fn to write the config, set up a buffer for readings, and write the start/stop ISRs
<re_irc>
<@dirbaio:matrix.org> (you can also rename only one of them too, if you want to keep the 1.0 as the "main" one for example)
<re_irc>
<@firefrommoonlight:matrix.org> What altimeter, btw?
<re_irc>
<@laura7089:matrix.org> : to clarify, the altimeter doesn't require that you pass it a "delay" object (because I anticipated this problem), it requires that the caller wait themselves or block on the device's ready flag
jsolano has quit [Remote host closed the connection]
jsolano has joined #rust-embedded
vancz has quit []
vancz has joined #rust-embedded
starblue2 has quit [Ping timeout: 245 seconds]
starblue2 has joined #rust-embedded
starblue2 has quit [Ping timeout: 264 seconds]
starblue2 has joined #rust-embedded
<re_irc>
<@dkhayes117:matrix.org> I had ideas about a device with this capability, I didn't know they existed. I wonder what the power consumption is.
<re_irc>
<@dkhayes117:matrix.org> Hmm. Advertised as ultra low power.
<re_irc>
<@jamesmunns:beeper.com> Gotta be careful with that, sometimes "ultra low power" only means when you're powered off, and then it's 300mA to associate/send/receive data :D
<re_irc>
<@jamesmunns:beeper.com> which is _fine_ if your plan is "wake up once a day to send data", not so much if you are trying to do something fancier :D
<re_irc>
<@jamesmunns:beeper.com> (I have no idea about this specific chip tho, but that seems to be par for the course for any radio really like cellular, wifi, or even some of the lora-ish stuff)
<re_irc>
<@ryan-summers:matrix.org> Yeah, anything that goes farther than BT LE range (20-30m) tends to have a pretty high power consumption when on
<re_irc>
<@ryan-summers:matrix.org> But "low power" and "high power" are incredibly relative terms. For some caes, <10 mA is super low power, but some systems define that as pA ;)
<re_irc>
<@diondokter:matrix.org> LoRa isn't too bad either because you can get away with a signal strength at the receiver that is a couple of decibels under the noise floor
<re_irc>
<@jamesmunns:beeper.com> add "portable" to that list
<re_irc>
<@jamesmunns:beeper.com> sometimes it means "fits in a pocket". Sometimes it means "can be towed by a truck" :D
<re_irc>
> The address of the Reset handler can be seen in the disassembly above, being 0x44.However I can't see where the address 0x44 is written. It's in the GDB output, but not the dissassembly.
<re_irc>
> The address of the Reset handler can be seen in the disassembly above, being 0x44.
<re_irc>
> However I can't see where the address 0x44 is written. It's in the GDB output, but not the dissassembly.
<re_irc>
<@pollyglot:pyjam.as> ->
emerent has quit [Ping timeout: 246 seconds]
emerent has joined #rust-embedded
starblue2 has quit [Quit: WeeChat 3.8]
<re_irc>
<@pollyglot:pyjam.as> am i just blind or is this a mistkae
<re_irc>
<@pollyglot:pyjam.as> * mistake
<re_irc>
<@ryan-summers:matrix.org> Looks like a mistake to me, I also don't see any reference to 0x44
<re_irc>
<@pollyglot:pyjam.as> if you ctrl+f 0x44 it shows up in the statement I copy pasted, and at the bottom when setting a breakpoint at HardFault,,, which I realise as I'm typing this isn't relevant lol
<re_irc>
<@pollyglot:pyjam.as> I'll report it
<re_irc>
<@pronvis:matrix.org> Hello mates!
<re_irc>
Is there any rust projects for BigTreeTech boards?
<re_irc>
<@pronvis:matrix.org> Hello mates! Is there any rust projects for BigTreeTech boards?
dreamcat4 has quit [Server closed connection]
dreamcat4 has joined #rust-embedded
<re_irc>
<@jamesmunns:beeper.com> pronvis: Haven't seen those boards specifically, if you know the chips on them, you might be able to find some more general building blocks out there though!
<re_irc>
<@ryan-summers:matrix.org> It looks like they use standard MARLIN 3D printer firmware for that board. Are there any Rust MARLIN project equivalents?
<re_irc>
<@ryan-summers:matrix.org> That'd be a good start. Those 3D printer boards are actually all really standardized surprisingly
<re_irc>
<@jamesmunns:beeper.com> Gotcha! Seems to be running an STM32F103, which there are lots of projects here - but I don't think I've seen someone set up a project with all the external parts and logic and things
<re_irc>
I might end up working backwards from the linux kernel impl, but I was wondering are there usually reference manuals for this stuff, either:
<re_irc>
- From the designer (MG)
<re_irc>
- From the implementer (Allwinner)
<re_irc>
The Allwinner user manual doesn't have anything (including register defs!) in it regarding usb-otg, I was wondering if there is some PDF out there that I could find, like if someone with an NDA happened to leave it somewhere indexable :D
<re_irc>
<@jamesmunns:beeper.com> not sure if you're in the USB game still, or if you happened to know how these IP blocks work :D