Board support library for C027 - updated with thread-safe wait()

Fork of C027 by u-blox

Committer:
ansond
Date:
Fri Sep 12 21:00:10 2014 +0000
Revision:
16:286a756a8d3f
Parent:
14:e30f90b5447e
updated with thread-safe wait()

Who changed what in which revision?

UserRevisionLine numberNew 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 14:e30f90b5447e 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 14:e30f90b5447e 24 void mdmUsbEnable(bool enable); // enable the USB interface
mazgch 6:e11bf54dd344 25 void mdmReset(void);
mazgch 8:a356376db984 26 void mdmWakeup(void);
mazgch 8:a356376db984 27 void mdmSleep(void);
mazgch 7:e3eab86f1de9 28 void gpsPower(bool enable);
mazgch 6:e11bf54dd344 29 void gpsReset(void);
mazgch 6:e11bf54dd344 30
mazgch 6:e11bf54dd344 31 private:
mazgch 7:e3eab86f1de9 32 // modem pins
mazgch 8:a356376db984 33 DigitalOut mdmEn;
mazgch 8:a356376db984 34 DigitalOut mdmRst;
mazgch 8:a356376db984 35 DigitalOut mdmPwrOn;
mazgch 8:a356376db984 36 DigitalOut mdmLvlOe;
mazgch 13:fb30e9923a7b 37 DigitalOut mdmILvlOe;
mazgch 8:a356376db984 38 DigitalOut mdmUsbDet;
mazgch 8:a356376db984 39 bool mdmIsEnabled;
mazgch 14:e30f90b5447e 40 bool mdmUseUsb;
mazgch 7:e3eab86f1de9 41 // gps pins
mazgch 8:a356376db984 42 DigitalOut gpsEn;
mazgch 8:a356376db984 43 DigitalOut gpsRst;
mazgch 8:a356376db984 44 bool gpsIsEnabled;
mazgch 6:e11bf54dd344 45 };