Results 296 comments of Rahix

I'm also facing this on AVR: ```text Compiling arduino-leonardo v0.1.0 (/avr-hal/boards/arduino-leonardo) error: linking with `avr-gcc` failed: exit code: 1 | = note: "avr-gcc" "-mmcu=atmega32u4" "-Wl,--as-needed" "-L" "/rust/build/x86_64-unknown-linux-gnu/stage1/lib/rustlib/avr-atmega32u4/lib" "/avr-hal/target/avr-atmega32u4/debug/examples/rahix_are_we_large_int_yet-2408b37d61755303.panic_halt-adf0e0db19dc9c4b.panic_halt.524x37ge-cgu.0.rcgu.o.rcgu.o" "-o" "/avr-hal/target/avr-atmega32u4/debug/examples/rahix_are_we_large_int_yet-2408b37d61755303.elf"...

As a workaround, the following does the job for now: ```rust #[macro_use] extern crate cached; use std::time::{Instant, Duration}; use std::thread::sleep; use cached::SizedCache; struct Foo; impl Foo { fn slow_fn(&self, n:...

Hmm, you could give `self` as a parameter to the inner function, but that would require your struct to be `Eq`, `Hash` and worst of all: `Clone`. I think the...

@jaemk: The problem @kirhgoff encountered displays an API oversight in my opinion: Cached functions should be able to take 'context' parameters that are not cached.

Okay, I at least got my repo fixed again by aggressively wiping anything related to the submodule from its history ... Not sure what exactly helped, but at least I...

This is usually an inconsistency in the vendor-provided ATDF files. We have infrastructure here in `avr-device` to fix such things - check the existing patches in . Docs for the...

Ah, you got it and now I also remember: We didn't add enum-values for this timer precisely because of the split bit-field. There is no way to represent this in...

Actually, this can be seen, for example, in the _old_ PWM implementation. There, a setup function had to be defined manually for each timer. Compare https://github.com/Rahix/avr-hal/blob/ce52c90d3950cd81090627e3ad8494a15e4c8f66/chips/atmega328p-hal/src/pwm.rs#L48 with https://github.com/Rahix/avr-hal/blob/ce52c90d3950cd81090627e3ad8494a15e4c8f66/chips/atmega328p-hal/src/pwm.rs#L95-L97 I don't...

It's a difficult decision to make... I completely agree that a proper abstraction on top is needed and it should go into `avr-hal`, not here. Using `.bits()` is the right...

Support for MCUs starts in [`avr-device`](https://github.com/Rahix/avr-device) so let's move discussion there. The README contains instruction on adding new MCUs, most notably an ATDF file is required. As the LGT8F chips...