<re_irc>
<@w00tspeaks:matrix.org> The arduino leonardo usb serial CDC device appears to not be supported directly in avr-hal. Is there anyother crate that can help me?
<re_irc>
<@w00tspeaks:matrix.org> FWIW, I couldn't find a driver implementation for atmega32u4 for usb-device either.
neceve has joined #rust-embedded
dcz has joined #rust-embedded
<re_irc>
<@disasm-ewg:matrix.org> Wren T: usb-device needs `AtomicPtr` and atmega32u4 doesn't have any atomics iirc
<re_irc>
<@jamesmunns:matrix.org> disasm: Maybe we could use dirbaio 's atomic-polyfill?
<re_irc>
<@jamesmunns:matrix.org> Is there a global interrupt mask on the atmega arch?
<re_irc>
<@jamesmunns:matrix.org> And has someone made a critical section impl for it already?
<re_irc>
<@9names:matrix.org> is there a microcontroller that has interrupts and doesn't have interrupt disable/enable flags of some sort?
<re_irc>
<@disasm-ewg:matrix.org> Something with NMI/HardFault probably
emerent_ has joined #rust-embedded
emerent_ is now known as emerent
emerent is now known as Guest7970
Guest7970 has quit [Ping timeout: 272 seconds]
<re_irc>
<@9names:matrix.org> in the case of an NMI or hardfault you should not be caring about atomic values anyway, so... i guess they're fine?
<re_irc>
<@disasm-ewg:matrix.org> In case of USB probably yes, but in general Rust allows this
<re_irc>
<@disasm-ewg:matrix.org> RP2040 will face the same problem maybe. But it also has two cores which makes the idea even more unsound
<re_irc>
<@9names:matrix.org> but it also has hardware spinlock registers, so we can implement the polyfill with one of those
<re_irc>
<@9names:matrix.org> they are not "fair" (core0 gets priority over core1) so starvation is definitely a concern, but it's better than dealing with data races
dcz has quit [Ping timeout: 256 seconds]
dcz has joined #rust-embedded
<re_irc>
<@w00tspeaks:matrix.org> The avr-hal implementation of usart also appears to not be generic enough to support the USB serial right now. I'm not sure what the approach to fix it might be.
<re_irc>
<@w00tspeaks:matrix.org> Maybe I just need to stick with pseudo-c++ (arduino) for now.
<re_irc>
<@9names:matrix.org> which thing is expensive?
<re_irc>
<@9names:matrix.org> the simpler stm32s should not be much more expensive than an avr, assuming you can find any at the moment due to chipageddon
<re_irc>
<@dirbaio:matrix.org> chipocalypse
<re_irc>
<@w00tspeaks:matrix.org> I like chipocalypse
<re_irc>
<@mriise:matrix.org> idk of any dev boards besides the one from NXP,
<re_irc>
<@mriise:matrix.org> the only other one i know of for lpc55 family is for lpc55s69
<re_irc>
<@mriise:matrix.org> if you are wanting fully developed devises for CAN then i do not know of any sadly
<re_irc>
<@w00tspeaks:matrix.org> Okay, so what would I need to program these?
<re_irc>
<@w00tspeaks:matrix.org> Do you need a separate programmer?
<re_irc>
<@w00tspeaks:matrix.org> Or can you program with something like avrdude?
<re_irc>
<@mriise:matrix.org> if you want to program these then you will have to use the JLink patch for the link2 integrated chip
<re_irc>
<@mriise:matrix.org> but that's just over the microusb port
<re_irc>
<@w00tspeaks:matrix.org> Does that mean I need some JLink piece of hardware or are you saying I just need a usb cable?
<re_irc>
<@9names:matrix.org> the lpcxpresso boards come with a second on-board microcontroller for programming. you need to reprogram it with jlink firmware
<re_irc>
<@9names:matrix.org> or cmsis-dap firmware, that is better supported by probe-rs
<re_irc>
<@w00tspeaks:matrix.org> So, I do need some kind of programmer?
<re_irc>
<@9names:matrix.org> from the page you just linked "he board features an onboard LPC-Link2 debug probe based on the LPC4322 MCU for a performance debug experience over high-speed USB, with easy firmware update options to support CMSIS-DSP or a special version of J-link LITE from SEGGER."
<re_irc>
<@9names:matrix.org> you can run lpcscrypt to change the firmware on the debugger that is integrated onto the board
<re_irc>
<@w00tspeaks:matrix.org> Can this be done from Linux?
<re_irc>
<@9names:matrix.org> yes
<re_irc>
<@w00tspeaks:matrix.org> Cool.
<re_irc>
<@w00tspeaks:matrix.org> Thanks for answering all these n00b questions.
<re_irc>
<@9names:matrix.org> thank you for asking and listening
neceve has quit [Remote host closed the connection]
fabic has quit [Ping timeout: 256 seconds]
<re_irc>
<@w00tspeaks:matrix.org> I bought a couple. I guess we'll see how this goes.
<re_irc>
<@marcuss2:tedomum.net> jamesmunns: Yes, you can just disable interrupts, run your code and re-enable them again on AVR
<re_irc>
<@mriise:matrix.org> @wr
dcz has quit [Ping timeout: 258 seconds]
fabic has joined #rust-embedded
<re_irc>
<@jatsekku:matrix.org> Hello guys!
<re_irc>
<@jatsekku:matrix.org> I would like to get involved into contributions for avr-hal.
<re_irc>
<@jatsekku:matrix.org> I'm looking for some help how to get started, maybe some kind of mentoring etc. I'm pretty new to the rust, and total newbie in open source contribution.
<re_irc>
<@jwagen:matrix.org> jatsekku: you can also check out #avr-rust_Lobby:gitter.im .
<re_irc>
<@jatsekku:matrix.org> Thank you
dcz has joined #rust-embedded
fabic has quit [Ping timeout: 240 seconds]
fabic has joined #rust-embedded
GenTooMan has quit [Ping timeout: 256 seconds]
GenTooMan has joined #rust-embedded
fabic has quit [Ping timeout: 272 seconds]
fabic has joined #rust-embedded
fabic has quit [Ping timeout: 265 seconds]
<re_irc>
<@john_socha:matrix.org> I'd like to get some feedback on a crate that I plan to publish to crates.io. This is a driver for a character LCD that uses I2C. I have it working for a version of the display with an RGB backlight, and plan to update it, if needed, to also work with a monochrome character LCD. Both of these displays are 16x2...
<re_irc>
... displays. I'm about three weeks into my Rust journey and would love to get feedback and suggestions of things I should change before I publish the crate. https://github.com/JohnSL/lcd_1602_i2c