Board support library for C027
Dependents: IoTWorkshopLCD IoTWorkshopBuzzer IoTWorkshopSensors C027_USSDTest ... more
Fork of C027 by
C027.h@7:e3eab86f1de9, 2013-10-25 (annotated)
- Committer:
- mazgch
- Date:
- Fri Oct 25 08:46:43 2013 +0000
- Revision:
- 7:e3eab86f1de9
- Parent:
- 6:e11bf54dd344
- Child:
- 8:a356376db984
added function to power and reset the modules on the board; make sure the correct board revision is selected
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mazgch | 2:b7bd3660ff64 | 1 | /* Platform header file, for the u-blox C27-C20/U20/G35 |
mazgch | 2:b7bd3660ff64 | 2 | * mbed Internet of Things Starter Kit |
mazgch | 2:b7bd3660ff64 | 3 | * http://mbed.org/platforms/u-blox-C027/ |
mazgch | 2:b7bd3660ff64 | 4 | * |
mazgch | 2:b7bd3660ff64 | 5 | */ |
mazgch | 2:b7bd3660ff64 | 6 | |
mazgch | 2:b7bd3660ff64 | 7 | #pragma once |
mazgch | 2:b7bd3660ff64 | 8 | |
mazgch | 6:e11bf54dd344 | 9 | #include "mbed.h" |
mazgch | 5:ff17f16cf70a | 10 | #include "C027_PinNames.h" |
mazgch | 5:ff17f16cf70a | 11 | |
mazgch | 3:b54777b90da1 | 12 | // Override the weak mbed die function that flashes the leds. |
mazgch | 3:b54777b90da1 | 13 | // We do not have fancy leds that can be flashed on the C027. |
mazgch | 3:b54777b90da1 | 14 | void mbed_die(void); |
mazgch | 6:e11bf54dd344 | 15 | |
mazgch | 7:e3eab86f1de9 | 16 | #define C027_REVA // remove this define for the revision B boards |
mazgch | 7:e3eab86f1de9 | 17 | |
mazgch | 6:e11bf54dd344 | 18 | class C027 |
mazgch | 6:e11bf54dd344 | 19 | { |
mazgch | 6:e11bf54dd344 | 20 | public: |
mazgch | 6:e11bf54dd344 | 21 | C027(); |
mazgch | 6:e11bf54dd344 | 22 | |
mazgch | 6:e11bf54dd344 | 23 | void mdmPower(bool enable); |
mazgch | 6:e11bf54dd344 | 24 | void mdmReset(void); |
mazgch | 7:e3eab86f1de9 | 25 | void gpsPower(bool enable); |
mazgch | 6:e11bf54dd344 | 26 | void gpsReset(void); |
mazgch | 6:e11bf54dd344 | 27 | |
mazgch | 6:e11bf54dd344 | 28 | private: |
mazgch | 7:e3eab86f1de9 | 29 | // modem pins |
mazgch | 6:e11bf54dd344 | 30 | DigitalOut mdmEn; |
mazgch | 7:e3eab86f1de9 | 31 | #ifndef C027_REVA |
mazgch | 6:e11bf54dd344 | 32 | DigitalOut mdmRst; |
mazgch | 7:e3eab86f1de9 | 33 | #endif |
mazgch | 6:e11bf54dd344 | 34 | DigitalOut mdmPwrOn; |
mazgch | 6:e11bf54dd344 | 35 | DigitalOut mdmRts; |
mazgch | 6:e11bf54dd344 | 36 | bool mdmIsEnabled; |
mazgch | 7:e3eab86f1de9 | 37 | // gps pins |
mazgch | 6:e11bf54dd344 | 38 | DigitalOut gpsEn; |
mazgch | 6:e11bf54dd344 | 39 | DigitalOut gpsRst; |
mazgch | 6:e11bf54dd344 | 40 | bool gpsIsEnabled; |
mazgch | 6:e11bf54dd344 | 41 | }; |
mazgch | 6:e11bf54dd344 | 42 |