0

I'm trying to find the values of several C++ constants which are useful for coding the V1 microbit's ADC, such as ADC_ENABLE_ENABLE_Enabled (in this article).

I believe the #include "MicroBit.h" refers to this repo https://github.com/lancaster-university/microbit/tree/master/inc but I can't find the ADC definitions!

keble
  • 93
  • 1
  • 11

1 Answers1

1

The definitions for these macros come from deep in the low-level libraries for the microprocessor used on the BBC microbit, the nrf51822. Higher level libraries typically include these files (or the build system might) to implement more intuitive and easier-to-use APIs. While I am not sure where these files are on your system as it depends on your build environment, the source is on GitHub: https://github.com/NordicSemiconductor/nrfx/blob/7eca6c2dc02b24cbdaa3ba0e63a7195e34ebe07c/mdk/nrf51_bitfields.h#L163

Unn
  • 4,775
  • 18
  • 30