Hi Matthew,
On 15-02-17 01:02, Matthew Lai wrote: > Hi Kristoff, > > That syntax is called designated initializers, and is only legal in C. > It's one of the few things that are legal in C (C99) and not C++. > I would recommend compiling the file as C, and the rest of your > application as C++. Though you'd want to make sure that the header has > conditional compilation for C++ that adds 'extern "C" {...}' to avoid > name mangling. After a good night sleep, I also came to the same conclussion. Thanks! :-) I never had to mix C and C++ before so I'm still strugling a bit but I'm getting there. Now, on a more general note, I do would like to make the case to make sure libopencm3 is (re)writen in a C++ compatible format. After all, concidering the popularity of the arduino platform, there is a lot of code for arduino for all kinds of devices. As said, the mfrc32 library I use is a port of a arduino C++ class to libopencm3. it is not that difficult to simply "translate" the gpio, SPI or UART calls from wiring into their libopencm3 equivalents, but if you need to start writing "wrapper"-code to go from C++ to C -as for cdcacm- it does make things (unnecessairy) complex. After all, we are all to gain from having an as-smooth-as-possible path to translate the (much larger) collection of arduino driver so we can use them on libopencm3. > Matthew Cheerio! Kr. Bonne. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ libopencm3-devel mailing list libopencm3-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libopencm3-devel