lancaster-university / codal-microbit-v2

CODAL target for the micro:bit v2.x series of devices
MIT License
43 stars 52 forks source link

Ensure header files and .cpp files use the codal namespace appropriately #437

Closed carlosperate closed 2 months ago

carlosperate commented 2 months ago

This is part of:

The only thing that hasn't been added to the codal namespace are the Mbed header files, as those are only included by programmes explicitly doing include <mbed.h>: https://github.com/lancaster-university/codal-microbit-v2/blob/96faa8526a4127f6738b2cd5d66595f25ee50b35/inc/compat/mbed.h#L11-L17

This PR uses a new config option added to codal-core in https://github.com/lancaster-university/codal-nrf52/commit/8802eb49140e0389e535cb6160d9080efd951ba7. By default is set to 1, so that the codal namespace is still added globally in MicroBit.h, but the user can change this config option in case they need to integrate CODAL with other frameworks and avoid clashes in the namespace.