Based off the Bog standard "Blinky "Example contained in the NRF SDK :- C:\nRF5_SDK_17.0.2_d674dde\examples\peripheral\blinky\pca10059\mbr\ses\blinky_pca10059_mbr.emProject Load in the project using Segger Studio , Select the main.c file , delete its contents and paste the contents below. Build and send the .hex file to the nRF52840. Yes the code is linear, its done this way to break down the port assignments to make it easier to see what is going on. The GPIO's are in two banks of 32 bits (as they are basically registers ported out to the pins. Seamingly random distribution though. |
// GPIO Outputs
#include <stdbool.h> #define led1 13 /** |