Skip to content

Commit

Permalink
boards/10005: cleaned up LED handling
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Feb 18, 2016
1 parent b56dd91 commit a24ceff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion boards/pca10005/board.c
Expand Up @@ -26,7 +26,7 @@
void board_init(void)
{
/* setup led(s) for debugging */
NRF_GPIO->PIN_CNF[LED_RED_PIN] = GPIO_PIN_CNF_DIR_Output;
NRF_GPIO->DIRSET = (LED_RED_MASK);

/* initialize the CPU */
cpu_init();
Expand Down
9 changes: 5 additions & 4 deletions boards/pca10005/include/board.h
Expand Up @@ -43,11 +43,12 @@ extern "C" {
* @name Macros for controlling the on-board LEDs.
* @{
*/
#define LED_RED_PIN 1
#define LED_RED_PIN (GPIO_PIN(0, 1))
#define LED_RED_MASK (1 << 1)

#define LED_RED_ON (NRF_GPIO->OUTSET = (1 << LED_RED_PIN))
#define LED_RED_OFF (NRF_GPIO->OUTCLR = (1 << LED_RED_PIN))
#define LED_RED_TOGGLE (NRF_GPIO->OUT ^= (1 << LED_RED_PIN))
#define LED_RED_ON (NRF_GPIO->OUTSET = (1 << LED_RED_MASK))
#define LED_RED_OFF (NRF_GPIO->OUTCLR = (1 << LED_RED_MASK))
#define LED_RED_TOGGLE (NRF_GPIO->OUT ^= (1 << LED_RED_MASK))
#define LED_GREEN_ON /* not available */
#define LED_GREEN_OFF /* not available */
#define LED_GREEN_TOGGLE /* not available */
Expand Down

0 comments on commit a24ceff

Please sign in to comment.