Skip to content

Commit bdfa1ec

Browse files
authored
Ensure all .cpp files have using namespace codal. (#54)
As part of: lancaster-university/codal-microbit-v2#240 Cannot remove all header files usage of `using namesapce` yet as that will affect other CODAL targets that might not have apply this type of patch yet.
1 parent 62da916 commit bdfa1ec

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

source/NRF52ADC.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ DEALINGS IN THE SOFTWARE.
2929
#include "nrf.h"
3030
#include "cmsis.h"
3131

32+
using namespace codal;
33+
3234
// Calculation to determine the optimal usable space for a DMA buffer for the given number of channels
3335
#define NRF52ADC_DMA_ALIGNED_SIZED(c) ((bufferSize - (bufferSize % (c * 2 * softwareOversample)))/2);
3436

source/NRF52PDM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ DEALINGS IN THE SOFTWARE.
2626
#include "NRF52PDM.h"
2727
#include "nrf.h"
2828

29+
using namespace codal;
30+
2931
// Handle on the last (and probably only) instance of this class (NRF52 has only one PDM module)
3032
static NRF52PDM *nrf52_pdm_driver = NULL;
3133

source/NRF52PWM.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#include "nrf.h"
33
#include "cmsis.h"
44

5+
using namespace codal;
6+
57
#define NRF52PWM_EMPTY_BUFFERSIZE 8
68
static uint16_t emptyBuffer[NRF52PWM_EMPTY_BUFFERSIZE];
79

source/neopixel.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
#include "neopixel.h"
66

7+
using namespace codal;
8+
79
#if CONFIG_ENABLED(HARDWARE_NEOPIXEL)
810

911
void neopixel_send_buffer(Pin &pin, const uint8_t *ptr, int numBytes)
@@ -88,5 +90,5 @@ __attribute__((noinline)) void neopixel_send_buffer(Pin &pin, const uint8_t *ptr
8890

8991
void neopixel_send_buffer(Pin &pin, ManagedBuffer buffer)
9092
{
91-
neopixel_send_buffer(pin, &buffer[0], buffer.length());
93+
codal::neopixel_send_buffer(pin, &buffer[0], buffer.length());
9294
}

0 commit comments

Comments
 (0)