スマートロックソフトウェア(BLE nano用)

Dependencies:   BLE_API mbed nRF51822

Committer:
toshiyukisaito
Date:
Fri Sep 04 13:29:59 2015 +0000
Revision:
0:fcfa8140d2db
SmartLock Version1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
toshiyukisaito 0:fcfa8140d2db 1 /*
toshiyukisaito 0:fcfa8140d2db 2
toshiyukisaito 0:fcfa8140d2db 3 Copyright (c) 2012-2014 RedBearLab
toshiyukisaito 0:fcfa8140d2db 4
toshiyukisaito 0:fcfa8140d2db 5 Permission is hereby granted, free of charge, to any person obtaining a copy of this software
toshiyukisaito 0:fcfa8140d2db 6 and associated documentation files (the "Software"), to deal in the Software without restriction,
toshiyukisaito 0:fcfa8140d2db 7 including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
toshiyukisaito 0:fcfa8140d2db 8 and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
toshiyukisaito 0:fcfa8140d2db 9 subject to the following conditions:
toshiyukisaito 0:fcfa8140d2db 10 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
toshiyukisaito 0:fcfa8140d2db 11
toshiyukisaito 0:fcfa8140d2db 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
toshiyukisaito 0:fcfa8140d2db 13 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
toshiyukisaito 0:fcfa8140d2db 14 PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
toshiyukisaito 0:fcfa8140d2db 15 FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
toshiyukisaito 0:fcfa8140d2db 16 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
toshiyukisaito 0:fcfa8140d2db 17
toshiyukisaito 0:fcfa8140d2db 18 */
toshiyukisaito 0:fcfa8140d2db 19
toshiyukisaito 0:fcfa8140d2db 20 #ifndef _SERVO_H
toshiyukisaito 0:fcfa8140d2db 21 #define _SERVO_H
toshiyukisaito 0:fcfa8140d2db 22
toshiyukisaito 0:fcfa8140d2db 23 #include "mbed.h"
toshiyukisaito 0:fcfa8140d2db 24
toshiyukisaito 0:fcfa8140d2db 25 class Servo
toshiyukisaito 0:fcfa8140d2db 26 {
toshiyukisaito 0:fcfa8140d2db 27 public:
toshiyukisaito 0:fcfa8140d2db 28 Servo(PinName pin);
toshiyukisaito 0:fcfa8140d2db 29 ~Servo(void);
toshiyukisaito 0:fcfa8140d2db 30
toshiyukisaito 0:fcfa8140d2db 31 void write(unsigned char degree);
toshiyukisaito 0:fcfa8140d2db 32
toshiyukisaito 0:fcfa8140d2db 33 private:
toshiyukisaito 0:fcfa8140d2db 34 void convert(unsigned char degree);
toshiyukisaito 0:fcfa8140d2db 35
toshiyukisaito 0:fcfa8140d2db 36 PwmOut _servo;
toshiyukisaito 0:fcfa8140d2db 37 unsigned int pulse;
toshiyukisaito 0:fcfa8140d2db 38 };
toshiyukisaito 0:fcfa8140d2db 39
toshiyukisaito 0:fcfa8140d2db 40 #endif