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
cr1901_ is now known as cr1901
sroemer has joined #rust-embedded
sroemer has quit [Ping timeout: 252 seconds]
sroemer has joined #rust-embedded
sroemer has quit [Changing host]
sroemer has joined #rust-embedded
sroemer has quit [Ping timeout: 252 seconds]
azqb[m] has joined #rust-embedded
<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]
sroemer has joined #rust-embedded
korken89[m] has joined #rust-embedded
<korken89[m]> <azqb[m]> "Hello! I'm starting work on a..." <- PinState and `bool` are interchangeable so an `.map(Into::into)` should be enough: https://docs.rs/embedded-hal/1.0.0/embedded_hal/digital/enum.PinState.html#impl-From%3Cbool%3E-for-PinState
<korken89[m]> If it's the reason it's omitted is unclear to me though :)
emerent has quit [Ping timeout: 264 seconds]
emerent has joined #rust-embedded
shilga[m] has joined #rust-embedded
<shilga[m]> Hi,
<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 solved it right now by having the slice and the length stored separately, but that really feels ugly.... (full message at <https://catircservices.org/_irc/v1/media/download/AXYEpbdwbEOsSBz3yX1B4f65GtZOpVdRZvP7VoLMZ7-TK3o3rne_2dNsZuZq0dLsNqM_Cm4MDpZnEc10XRhLQSlCeS0nnrAAAGNhdGlyY3NlcnZpY2VzLm9yZy9jc21nbHBXa3lKZWRweVVvSW5PRUpjZ28>)
<shilga[m]> s/contains that//
<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]> <shilga[m]> "Hi,..." <- > <@shilga:matrix.org> Hi,
<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
chomp4570[m] has joined #rust-embedded
<chomp4570[m]> You could build sth like that yourself fairly easily using a CondVar
<chrysn[m]> Is there an embedded friendly condvar? Quick search only shows async_std's and other std based ones.
<chomp4570[m]> Oh, right, it's in std. Stupid me
<chrysn[m]> Nonetheless it's a good search input!
dirbaio[m] has quit [Quit: Idle timeout reached: 172800s]
sroemer has joined #rust-embedded
sroemer has quit [Changing host]
sroemer has joined #rust-embedded
YaseenTa has joined #rust-embedded
<YaseenTa> hu
<YaseenTa> hu
<YaseenTa> hi
YaseenTa has left #rust-embedded [#rust-embedded]
rom4ik1 is now known as rom4ik
rom4ik has quit [Quit: bye]
rom4ik has joined #rust-embedded
sroemer has quit [Ping timeout: 276 seconds]
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]