-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.c
52 lines (45 loc) · 1.18 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is property of Nordic Semiconductor ASA.
* Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
*
* Licensees are granted free, non-transferable use of the information. NO
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* the file.
*
*/
/** @file
*
* @defgroup blinky_example_main main.c
* @{
* @ingroup blinky_example
* @brief Blinky Example Application main file.
*
*/
#include <stdbool.h>
#include <stdint.h>
#include "nrf_delay.h"
#include "nrf_gpio.h"
#include "boards.h"
#include "SEGGER_RTT.h"
const uint8_t leds_list[LEDS_NUMBER] = LEDS_LIST;
/**
* @brief Function for application main entry.
*/
int main(void)
{
// Configure LED-pins as outputs.
LEDS_CONFIGURE(LEDS_MASK);
// Toggle LEDs.
while (true)
{
for (int i = 0; i < LEDS_NUMBER; i++)
{
LEDS_INVERT(1 << leds_list[i]);
nrf_delay_ms(1000);
SEGGER_RTT_printf(0, "i: %d\n", i);
}
}
}
/** @} */