#avr Logs

Oct 11 2021

#avr Calendar

01:19 PM LOVV is now known as lemmings
03:08 PM bpye: I don't suppose someone could help me understand why use of PROGMEM is wrong - https://gist.github.com/benpye/f2d88183833a2a193391c7f9af27205c - it's a very minimal example of the issue I'm seeing, seemingly testX == testY yet when using pgm_read_byte I get completely different results
04:15 PM exp: bpye: i always find this frustrating, but if you wish to have a pointer to PROGMEM, it must also be declared as such
04:16 PM bpye: exp: Huh - what would that look like?
04:16 PM exp: you're going to make me remember C's declaration precedence aren't you...
04:16 PM exp: hold on let me grep some old code so i can be lazy
04:17 PM bpye: Hah - sorry, I just don't know what that would look like in practice.
04:18 PM exp: something like const TestStruct __flash *self;
04:18 PM exp: couldn't remember which side of the __flash the * should be on
04:18 PM exp: i'd have to check if PROGMEM is just a synonym for __flash
04:18 PM exp: but the same principle applies afaik
04:19 PM exp: also is that a recursive stuct definition? i blankedo n that
04:19 PM bpye: The struct should be self referencing, in practice it's a graph, but in this example it's just something that references itself
04:21 PM exp: i'm sure that'll add a fun extra twist :)
04:26 PM specing_ is now known as specing
08:35 PM jancoow3 is now known as jancoow
10:13 PM jmiehe1 is now known as jmiehe