These are chat archives for esp8266/Arduino

7th
Jan 2019
Michael Miller
@Makuna
Jan 07 06:50
Could I get a little sanity/eyes on a simple problem I am having modifying uart.c. I added the following snippit and now I get compile error "error: unknown type name 'uartIntContext_t' at the front of the last line, pointing at static
struct uartIntContext_t
{
    uartInterruptHandler callback;
    void* arg;
};

static uartIntContext_t s_uartInterruptContext[2];
Michael Miller
@Makuna
Jan 07 06:55
why is there still c code in any modern project!
The problem is that c requires the archaic struct definitions, so the last line must be
static volatile struct uartIntContext_t s_uartInterruptContext[2];
Michael Miller
@Makuna
Jan 07 08:59
Board support guidance request: Why is there no Sonos board entry? The flash type needs to default DOUT for it to program the sonos. Should there be a Sonos board entry? Is there another place to document this other than board entries?
Me No Dev
@me-no-dev
Jan 07 09:17
lots of C in lots of projects @Makuna :) you could have typedefed it
david gauchard
@d-a-v
Jan 07 09:50
@makuna sonos or sonoff ?
Michael Miller
@Makuna
Jan 07 18:53
@d-a-v sonoff is the correct one
Develo
@devyte
Jan 07 19:14
why is there still c code in any modern project!
C has its place in the world, but for a project like our core, I wonder the same thing.
Michael Miller
@Makuna
Jan 07 19:44
My comment about C isn't about a design decision of not using classes/templates/etc, but that most modern compilers are C++/C so the requirement of using older syntax that C (file extension only most of the time) forces seems rather amish in nature.
Any guidance on Sonoff board support. Sorry I kept typing Sonos before, not sure why I do things sometimes ;-)
david gauchard
@d-a-v
Jan 07 19:55
Are you currently using generic esp8266 with DOUT flash for sonoff boards ?
Shelby Merrick
@forkineye
Jan 07 20:25
You looking at any specific sonoff boards? I was going to write my own as well, but Tasmota has worked for my needs. Lots of sonoff info in their project - https://github.com/arendst/Sonoff-Tasmota
Michael Miller
@Makuna
Jan 07 21:40
@d-a-v Yes, "Generic ESP8266 Module" and then set flash to DOUT. I switch around to a lot of devices for testing my libs, remembering to switch flash to DOUT always waists time before I remember ;-)
david gauchard
@d-a-v
Jan 07 22:19
I understand. We could add a new generic board with DOUT forced, since lots of boards out there are wired this way. Changes must be made in tools/boards.txt.py . Would you be able to do the PR ?
Michael Miller
@Makuna
Jan 07 22:35

I could, but I am still wrapping my head around exposing boards that easy to find to solve problems verus just informing users.

It seems just adding anothing generic that defaults to this doesn't solve the issue for users, why would they think to use it over the current generic? Not all users know that their specific model has this requirement; but they do know that they have a Sonoff.

But then, do all Sonoff require this, so far it does seem that way.
Michael Miller
@Makuna
Jan 07 22:43
I believe there was a discussion before about having every board maker injecting their own "entry" being problematic; but I don't remember the outcome of that discussion and if this specific case was talked about.