You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Interestingly, Espruino already has a similar 'do anything' implementation for parallel-interface LCDs, that's used on the 'HY' boards: https://github.com/espruino/Espruino/blo­b/master/libs/graphics/lcd_fsmc.c#L403

    With the two-way comms on those it can actually read out the controller ID and then execute the correct code.

    It's a hard balance with modules though - you don't want loads of modules from the point of view of maintenance, but at the same time you don't want to be using up precious RAM with code that you're never using.

    I guess one option is to actually generate multiple files using some kind of preprocessor. In fact with minification and the closure compiler it'd be possible to do it just with IF statements...

About

Avatar for Gordon @Gordon started