<azqb[m]>
Hello! I'm starting work on a project that uses embedded_hal. More of a curiosity question: eh:digital:OutputPin has a provided setState method which takes a PinState. Yet InputPin doesn't appear to have a matching state method which returns a PinState. Is this omitted for a reason?
bpye has quit [Quit: Ping timeout (120 seconds)]
bpye has joined #rust-embedded
ivmarkov[m] has quit [Quit: Idle timeout reached: 172800s]
<shilga[m]>
has somebody some tips for creating and modifying strings in `no_std` ? It begins in creating a struct that contains that should contain the string and it's memory. So the `&str` which is given in `new()` should be copied over to be part of the struct. I've found no good way to create a string with a max length. The only options I have found while googling for a solution is to use the heap.
<shilga[m]>
I also have not found a way to easily concat strings in no_std. I ended up copying the raw data from slice to slice, which also feels really ugly.
diondokter[m] has joined #rust-embedded
<diondokter[m]>
> has somebody some tips for creating and modifying strings in `no_std` ? It begins in creating a struct that should contain the string and it's memory. So the `&str` which is given in `new()` should be copied over to be part of the struct. I've found no good way to create a string with a max length. The only options I have found while googling for a solution is to use the heap.
<diondokter[m]>
You're probably looking for a fixed size string. The `arrayvec` and the `heapless` crates both have a good implementation that I recommend you take a look at.
<dav1d>
Danilo[m], yep it's pretty awesome, should also be able to do the same without idf pretty easily
<shilga[m]>
<diondokter[m]> "> <@shilga:matrix.org> Hi,..." <- thanks, `ArrayString` seems to be what I'm searching for.
sroemer has quit [Quit: WeeChat 4.4.2]
rafael[m] has quit [Quit: Idle timeout reached: 172800s]
chrysn[m] has joined #rust-embedded
<chrysn[m]>
Is there a general-purpose "async option cell" type similar to static-cell, so that I can declare `static MY_THING: AsyncCell<MyType> = AsyncCell::empty();`, and then anywhere in the code I can call `let thing: &MyType = MY_THING.... (full message at
Henk[m] has quit [Quit: Idle timeout reached: 172800s]
tamme[m] has quit [Quit: Idle timeout reached: 172800s]
adamgreig[m] has quit [Quit: Idle timeout reached: 172800s]
sroemer has joined #rust-embedded
Ekho has quit [Quit: CORE ERROR, SYSTEM HALTED.]
<cr1901>
Is Yatekii around either on here or Matrix?
<JamesMunns[m]>
Noah ^
<cr1901>
Noah: Looking into msp430 support for probe-rs again. I see PRs like this, which make me think that external deps are discouraged. Is this correct? https://github.com/probe-rs/probe-rs/pull/2077
<cr1901>
libmsp430 is the easiest way to get msp430 support right now, and gradually reimplement FET drivers in Rust incrementally
Ekho has joined #rust-embedded
ryan-summers[m] has joined #rust-embedded
<ryan-summers[m]>
The main problem is that a user will need the prerequisite libraries before installing probe-rs, right? Getting libmsp430 isn't trivial from what I remember, esp. on things like windows-based systems
<cr1901>
You download it from TI's website, and you have to install drivers on Windows-based systems (I guess it's based on how libmsp430 talks to the devices, it's not actually all that clear to me why special drivers are required, since many protos talk over serial port).
<ryan-summers[m]>
Yeah there's various forks of the libMSP430 lib because TI gives out the source. There's a lot of ....odd design choices for the MSP-FET that the libMSP430 is written to abstract out, like the EEM polling thread. As an aside, it doesn't work all that great IME
<cr1901>
Is EEM still undocumented except for the source?
<ryan-summers[m]>
I've never seen any documents around it, but have gotten a billion error codes from the MSP-FET around "EEM polling thread still active" in my automated test systems :)
<cr1901>
Does probe-rs allow incremental support (e.g. programming only)?
<ryan-summers[m]>
I would imagine it would allow whatever you program it to allow. Or are you asking from a policy perspective (i.e. would it be okay if we only implemented programming support)? I don't see why you couldn't mark things as unimplemented!() for now though?
<cr1901>
Policy perspective. I don't like that I expect users to use mspdebug and possibly libmsp430- I think it's an ergonomic issue. But I cannot maintain Rust drivers for the myriad ways to talk to an msp430 device, especially if libmsp430 is unacceptable
<ryan-summers[m]>
I wonder if you could just bindgen in the libmsp430 source code? That would eliminate the ergonomic issues and then let you use the existing libs (even if they aren't great)
<cr1901>
Well that was my plan (at least attempt to do), but am unsure if it'll be accepted
<cr1901>
ryan-summers[m]: Oooh, I see what you're saying- compile libmsp430 on-demand. I'd have to think about that, not opposed.
<ryan-summers[m]>
Yeah that way you don't need the user to install libmsp430 on their system, it's just directly compiled with cc when probe-rs gets built and installed
<cr1901>
Assuming I get those bindings working, where do I start inserting calls to libmsp430 into probe-rs? Just enough to e.g. get programming working
<ryan-summers[m]>
Maybe better asked in the #probe-rs:matrix.org channel
<cr1901>
(Not sure why I expected /join #probe-rs to work lol)
<cr1901>
ryan-summers[m]: Right, I just remembered. At least for Linux, Windows, and Mac, TI provides a binary libmsp430 library. So no need to compile (for now) :P.
<ryan-summers[m]>
Ah right, just bindgen into the external lib and link it in
Artea has quit [Remote host closed the connection]
sroemer has quit [Ping timeout: 265 seconds]
tschundler has quit [Ping timeout: 252 seconds]
tschundler has joined #rust-embedded
Ralph[m] has joined #rust-embedded
<Ralph[m]>
korken89: GH's dependabot just offered me to upgrade `panic-halt` to v1.0.0 - congrats on the major release! 🥳
<Ralph[m]>
i noticed however that on your repo you neither have a v1.0.0 tag nor a GH release for it (the latter can only be created if you have the former) - maybe you forgot to push the tag? i'd also suggest to create the GH release to make it more visible
bartmassey[m] has quit [Quit: Idle timeout reached: 172800s]
i509vcb[m] has quit [Quit: Idle timeout reached: 172800s]
M9names[m] has quit [Quit: Idle timeout reached: 172800s]
berkus[m] has quit [Quit: Idle timeout reached: 172800s]
rmsyn[m] has quit [Quit: Idle timeout reached: 172800s]
AlexandrosLiarok has quit [Quit: Idle timeout reached: 172800s]
Jubilee[m] has quit [Quit: Idle timeout reached: 172800s]