SAKURA Internet IoT Communication Module Library for mbed
Dependents: patlite_sakuraio sakuraio_lte_firmwareupdater shownet2017-iinebutton patlite_sakuraio_stack ... more
SAKURA Internet IoT Communication Module Library for mbed
Sakura Communication Module (with sakura.io) library for mbed.
Support
This library supports following products.
- SCM-LTE-01 (sakura.io Module (LTE) )
- SCM-LTE-Beta (Sakura Communication Module (LTE) β)
Reference
Please see the datasheet.
License
The MIT License (MIT)
Copyright (c) SAKURA Internet Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Diff: SakuraIO.h
- Revision:
- 1:20e1dfe45dab
- Parent:
- 0:8d34375d954c
- Child:
- 2:6f8e51a42a7d
diff -r 8d34375d954c -r 20e1dfe45dab SakuraIO.h --- a/SakuraIO.h Sat Nov 19 03:20:17 2016 +0000 +++ b/SakuraIO.h Sat Nov 19 12:32:11 2016 +0000 @@ -1,6 +1,7 @@ #ifndef _SAKURAIO_H_ #define _SAKURAIO_H_ +#include "mbed.h" #include <SakuraIO/commands.h> class SakuraIO @@ -75,16 +76,19 @@ class SakuraIO_I2C : public SakuraIO { protected: - I2C &i2c; - void begin(); - void end(); - void sendByte(uint8_t data); - uint8_t startReceive(uint8_t length); - uint8_t receiveByte(bool stop); - uint8_t receiveByte(); + I2C i2c; + int _length; + + virtual void begin(); + virtual void end(); + virtual void sendByte(uint8_t data); + virtual uint8_t startReceive(uint8_t length); + virtual uint8_t receiveByte(bool stop); + virtual uint8_t receiveByte(); uint8_t mode; public: - SakuraIO_I2C(I2C &_i2c); + SakuraIO_I2C (I2C &_i2c); + SakuraIO_I2C (PinName sda, PinName scl); }; #endif // _SAKURAIO_H_