BLE Nano LED control

Dependencies:   BLE_API mbed nRF51822

Committer:
hiro99ma
Date:
Sat Dec 24 15:18:47 2016 +0000
Revision:
2:f4709d271f13
Parent:
0:355d86799c43
delete File Header

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hiro99ma 0:355d86799c43 1 #include "mbed.h"
hiro99ma 0:355d86799c43 2 #include "Led.h"
hiro99ma 0:355d86799c43 3
hiro99ma 0:355d86799c43 4 namespace {
hiro99ma 0:355d86799c43 5 const PinName DIGITAL_OUT_PIN = P0_19;
hiro99ma 0:355d86799c43 6 const int LED_OFF = 1;
hiro99ma 0:355d86799c43 7 const int LED_ON = 0;
hiro99ma 0:355d86799c43 8
hiro99ma 0:355d86799c43 9 DigitalOut mLed(DIGITAL_OUT_PIN, LED_OFF);
hiro99ma 0:355d86799c43 10 }
hiro99ma 0:355d86799c43 11
hiro99ma 0:355d86799c43 12
hiro99ma 0:355d86799c43 13 void LedOn()
hiro99ma 0:355d86799c43 14 {
hiro99ma 0:355d86799c43 15 mLed = LED_ON;
hiro99ma 0:355d86799c43 16 }
hiro99ma 0:355d86799c43 17
hiro99ma 0:355d86799c43 18 void LedOff()
hiro99ma 0:355d86799c43 19 {
hiro99ma 0:355d86799c43 20 mLed = LED_OFF;
hiro99ma 0:355d86799c43 21 }
hiro99ma 0:355d86799c43 22