#avr Logs

Jun 19 2019

#avr Calendar

06:05 AM day__ is now known as day
08:40 AM day__ is now known as day
11:07 AM gsi__ is now known as gsi_
12:45 PM Non-ICE: im struggeling with understanding what is going on with this code, how can i get the data in buf to a normal byte variable for furter processing?
12:45 PM Non-ICE: https://pastebin.com/NQBp13da
12:46 PM Non-ICE: the client.read is Ethernet.h
01:37 PM Kliment: Non-ICE: uint8_t something = buf[0];
01:37 PM Kliment: There's a byte for you
01:38 PM Non-ICE: thx mate, works like a charm
01:38 PM Non-ICE: thx Kliment, works like a charm
01:39 PM Kliment: Non-ICE: But why are you using an array of length one anyway?
01:39 PM Kliment: what if len is >1?
01:39 PM Non-ICE: im sufting through a long buffer
01:39 PM Non-ICE: its in a loop
01:39 PM Non-ICE: len is about 800
01:39 PM Non-ICE: i have 560 bytes of free ram
01:39 PM Non-ICE: sram*
01:41 PM Kliment: okay
01:41 PM Kliment: So in that case, instead of char buf[1] you just use char buf;
01:42 PM Kliment: And then, in the read/write use &buf
01:42 PM Non-ICE: i probably could but i already tried it
01:42 PM Non-ICE: and the entire thing stops working
01:42 PM Non-ICE: and i have no idea why
01:42 PM Non-ICE: fantastic!
04:28 PM cehteh: mhm .. challenge i asked earlier in #arduino : how to put __FILE__ into flash in a way that multiple uses are coalesced to a single instance/pointer
04:30 PM LeoNerd: -Os might do that
04:31 PM cehteh: nop
04:31 PM cehteh: notice on 'in flash'
04:31 PM cehteh: const char __flash* file = __FILE__;
04:32 PM cehteh: that works, but creates a new, unique instance everytime you use it
04:32 PM LeoNerd: Hrm.. :/
04:33 PM cehteh: if it would be trivial i wont ask :D
04:33 PM cehteh: const char __flash file[]= __FILE__
04:33 PM cehteh: i meant
04:33 PM cehteh: has to defined as array
04:33 PM cehteh: nout pointer
04:34 PM cehteh: would be nice if one could cast to __flash (__flash)__FILE__
04:34 PM LeoNerd: Oh, what sort of chip?
04:35 PM LeoNerd: Is it one of the new unified-memory AVR 1-series?
04:35 PM cehteh: guess which :) 328pb
04:35 PM cehteh: unified memory may work as well
04:36 PM LeoNerd: Ooh.. not on those then
04:36 PM LeoNerd: Those are still split
04:47 PM cehteh: the problem is that strings dont get coalesced
05:05 PM cehteh: aaah -fmerge-all-constants
05:19 PM LeoNerd: -fdo-what-I-want-damnit
05:20 PM LeoNerd: -Wno-not-like-that
11:38 PM day__ is now known as day