diff --git a/templates/blinky/nRF52840dk/hal.h b/templates/blinky/nRF52840dk/hal.h index be84040..252009f 100644 --- a/templates/blinky/nRF52840dk/hal.h +++ b/templates/blinky/nRF52840dk/hal.h @@ -1,14 +1,14 @@ #define P0 ((struct gpio *) 0x50000000) #define P1 ((struct gpio *) 0x50000300) -#define BUILD_IN_BUTTON_4_PIN 25 -#define BUILD_IN_BUTTON_3_PIN 24 -#define BUILD_IN_BUTTON_2_PIN 12 -#define BUILD_IN_BUTTON_1_PIN 11 -#define BUILD_IN_LED_1_PIN 13 -#define BUILD_IN_LED_2_PIN 14 -#define BUILD_IN_LED_3_PIN 15 -#define BUILD_IN_LED_4_PIN 16 +#define BUILT_IN_BUTTON_4_PIN 25 +#define BUILT_IN_BUTTON_3_PIN 24 +#define BUILT_IN_BUTTON_2_PIN 12 +#define BUILT_IN_BUTTON_1_PIN 11 +#define BUILT_IN_LED_1_PIN 13 +#define BUILT_IN_LED_2_PIN 14 +#define BUILT_IN_LED_3_PIN 15 +#define BUILT_IN_LED_4_PIN 16 enum { GPIO_MODE_INPUT, GPIO_MODE_OUTPUT }; enum { LOW, HIGH }; diff --git a/templates/blinky/nRF52840dk/main.c b/templates/blinky/nRF52840dk/main.c index 135763f..f52a539 100644 --- a/templates/blinky/nRF52840dk/main.c +++ b/templates/blinky/nRF52840dk/main.c @@ -2,21 +2,21 @@ #include "hal.h" int main(void) { - set_gpio_mode(P0, BUILD_IN_LED_1_PIN, GPIO_MODE_OUTPUT, 0); - set_gpio_mode(P0, BUILD_IN_LED_2_PIN, GPIO_MODE_OUTPUT, 0); - set_gpio_mode(P0, BUILD_IN_LED_3_PIN, GPIO_MODE_OUTPUT, 0); - set_gpio_mode(P0, BUILD_IN_LED_4_PIN, GPIO_MODE_OUTPUT, 0); + set_gpio_mode(P0, BUILT_IN_LED_1_PIN, GPIO_MODE_OUTPUT, 0); + set_gpio_mode(P0, BUILT_IN_LED_2_PIN, GPIO_MODE_OUTPUT, 0); + set_gpio_mode(P0, BUILT_IN_LED_3_PIN, GPIO_MODE_OUTPUT, 0); + set_gpio_mode(P0, BUILT_IN_LED_4_PIN, GPIO_MODE_OUTPUT, 0); while (1) { - gpio_write(P0, BUILD_IN_LED_1_PIN, HIGH); - gpio_write(P0, BUILD_IN_LED_2_PIN, HIGH); - gpio_write(P0, BUILD_IN_LED_3_PIN, HIGH); - gpio_write(P0, BUILD_IN_LED_4_PIN, HIGH); + gpio_write(P0, BUILT_IN_LED_1_PIN, HIGH); + gpio_write(P0, BUILT_IN_LED_2_PIN, HIGH); + gpio_write(P0, BUILT_IN_LED_3_PIN, HIGH); + gpio_write(P0, BUILT_IN_LED_4_PIN, HIGH); spin(9999999); - gpio_write(P0, BUILD_IN_LED_4_PIN, LOW); - gpio_write(P0, BUILD_IN_LED_3_PIN, LOW); - gpio_write(P0, BUILD_IN_LED_2_PIN, LOW); - gpio_write(P0, BUILD_IN_LED_1_PIN, LOW); + gpio_write(P0, BUILT_IN_LED_4_PIN, LOW); + gpio_write(P0, BUILT_IN_LED_3_PIN, LOW); + gpio_write(P0, BUILT_IN_LED_2_PIN, LOW); + gpio_write(P0, BUILT_IN_LED_1_PIN, LOW); spin(9999999); } } @@ -34,7 +34,7 @@ __attribute__((naked, noreturn)) void _reset(void) { extern void _estack(void); // Defined in link.ld -// 16 standard and 42 nRF52-specific handlers +// 16 standard and 42 nRF-specific handlers __attribute__((section(".vectors"))) void (*const tab[16 + 42])(void) = { _estack, _reset};