Knight Rider PIO sample for teckBASIC, konashi.js
Dependencies: BLE_API_Native_IRC mbed
Fork of BLE_konashi_PIO_test by
konashi.js mbed HRM1017でもナイトライダー!: http://jsdo.it/micutil/g1Hn
サンプル動画: https://www.youtube.com/watch?v=HSLdzS3sGLw
techBASICサンプル: https://www.dropbox.com/s/c1k25jlen7x3vqo/KnightRider.txt
BLE_API_Native_IRC/hw/nRF51822n/nRF51822n.h@0:8c643bfe55b7, 2014-07-10 (annotated)
- Committer:
- jksoft
- Date:
- Thu Jul 10 14:21:52 2014 +0000
- Revision:
- 0:8c643bfe55b7
??
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jksoft | 0:8c643bfe55b7 | 1 | /* mbed Microcontroller Library |
jksoft | 0:8c643bfe55b7 | 2 | * Copyright (c) 2006-2013 ARM Limited |
jksoft | 0:8c643bfe55b7 | 3 | * |
jksoft | 0:8c643bfe55b7 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
jksoft | 0:8c643bfe55b7 | 5 | * you may not use this file except in compliance with the License. |
jksoft | 0:8c643bfe55b7 | 6 | * You may obtain a copy of the License at |
jksoft | 0:8c643bfe55b7 | 7 | * |
jksoft | 0:8c643bfe55b7 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
jksoft | 0:8c643bfe55b7 | 9 | * |
jksoft | 0:8c643bfe55b7 | 10 | * Unless required by applicable law or agreed to in writing, software |
jksoft | 0:8c643bfe55b7 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
jksoft | 0:8c643bfe55b7 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
jksoft | 0:8c643bfe55b7 | 13 | * See the License for the specific language governing permissions and |
jksoft | 0:8c643bfe55b7 | 14 | * limitations under the License. |
jksoft | 0:8c643bfe55b7 | 15 | */ |
jksoft | 0:8c643bfe55b7 | 16 | |
jksoft | 0:8c643bfe55b7 | 17 | #ifndef __NRF51822_H__ |
jksoft | 0:8c643bfe55b7 | 18 | #define __NRF51822_H__ |
jksoft | 0:8c643bfe55b7 | 19 | |
jksoft | 0:8c643bfe55b7 | 20 | #define NRF51 |
jksoft | 0:8c643bfe55b7 | 21 | #define DEBUG_NRF_USER |
jksoft | 0:8c643bfe55b7 | 22 | #define BLE_STACK_SUPPORT_REQD |
jksoft | 0:8c643bfe55b7 | 23 | #define BOARD_PCA10001 |
jksoft | 0:8c643bfe55b7 | 24 | |
jksoft | 0:8c643bfe55b7 | 25 | #include "mbed.h" |
jksoft | 0:8c643bfe55b7 | 26 | #include "blecommon.h" |
jksoft | 0:8c643bfe55b7 | 27 | #include "hw/BLEDevice.h" |
jksoft | 0:8c643bfe55b7 | 28 | #include "hw/nRF51822n/nRF51Gap.h" |
jksoft | 0:8c643bfe55b7 | 29 | #include "hw/nRF51822n/nRF51GattServer.h" |
jksoft | 0:8c643bfe55b7 | 30 | |
jksoft | 0:8c643bfe55b7 | 31 | /**************************************************************************/ |
jksoft | 0:8c643bfe55b7 | 32 | /*! |
jksoft | 0:8c643bfe55b7 | 33 | \brief |
jksoft | 0:8c643bfe55b7 | 34 | |
jksoft | 0:8c643bfe55b7 | 35 | */ |
jksoft | 0:8c643bfe55b7 | 36 | /**************************************************************************/ |
jksoft | 0:8c643bfe55b7 | 37 | class nRF51822n : public BLEDevice |
jksoft | 0:8c643bfe55b7 | 38 | { |
jksoft | 0:8c643bfe55b7 | 39 | public: |
jksoft | 0:8c643bfe55b7 | 40 | nRF51822n(void); |
jksoft | 0:8c643bfe55b7 | 41 | virtual ~nRF51822n(void); |
jksoft | 0:8c643bfe55b7 | 42 | |
jksoft | 0:8c643bfe55b7 | 43 | virtual Gap& getGap() { return nRF51Gap::getInstance(); }; |
jksoft | 0:8c643bfe55b7 | 44 | virtual GattServer& getGattServer() { return nRF51GattServer::getInstance(); }; |
jksoft | 0:8c643bfe55b7 | 45 | virtual ble_error_t init(void); |
jksoft | 0:8c643bfe55b7 | 46 | virtual ble_error_t reset(void); |
jksoft | 0:8c643bfe55b7 | 47 | }; |
jksoft | 0:8c643bfe55b7 | 48 | |
jksoft | 0:8c643bfe55b7 | 49 | #endif |