On Saturday, 25 April 2015 at 11:38:46 UTC, Martin Nowak wrote:
On Saturday, 25 April 2015 at 05:07:04 UTC, Jens Bauer wrote:
I hope to find a good way to use import for microcontroller libraries, so it'll be easy for everyone. I'm thinking about something like ...

import mcu.stm32f439.all

I think that belongs in the makefile/dub.json as -version=STM32F439.
Then you could simply import mcu.gpio or mcu.spi.

I've had the same thoughts myself, but I do not like forcing the user to modify the Makefile. (I currently have a -complicated- Makefile system, which does not require the Makefile to be modified) I don't want to require the user to edit the linker-script either (though we're not really speaking about that; my point is that I want it to be simple and easy for D-newcomers; whether D is their first or 2nd language). It could be a good solution to use version(Ethernet), version(SPI5), version(LTDC) and version(SAI2) ... to enable interrupt handlers in the modules.

-But as I have not really worked with modules yet, there are still a lot of unknowns - I'm only guessing here.

Reply via email to