Board support library for C027

Dependents:   IoTWorkshopLCD IoTWorkshopBuzzer IoTWorkshopSensors C027_USSDTest ... more

Fork of C027 by u-blox

/media/uploads/ublox/c027_pinout_new.png

Revision:
18:06d5a702779c
Parent:
16:3ce62caf4518
Child:
19:61d31c12230d
--- a/C027.h	Tue Apr 08 12:38:34 2014 +0000
+++ b/C027.h	Sat Apr 12 08:01:14 2014 +0000
@@ -21,31 +21,62 @@
 
 //#define C027_REVA // select this define if you use revision A boards. 
 
+/** C027 Helper class to control the power supply and interface 
+    signals of the extended peripherials
+*/
 class C027
 {
 public:
+    /** Constructor, this function initialized the control pins.
+    */
     C027();
 
+    /** Enable the power supply of the Modem (MDM)
+    */
     void mdmPower(bool enable);
-    void mdmUsbEnable(bool enable); // enable the USB interface
+    
+    /** Activate the Usb Interface on LISA-C or LISA-U modems. For LISA-C this 
+        function must be called before its supply is enabled.
+        \param enable true if supply should be truned on, false if off
+    */
+    void mdmUsbEnable(bool enable);
+    
+    /** Reset the Modem 
+        \attention use with care and only a last resort.
+    */
     void mdmReset(void);
+    
+    /** Wakeup the Modem when in off mode.
+    */
     void mdmWakeup(void);
+    
+    /** Some Modem can be commanded in sleep mode 
+        by setting the power pin low for a long period. 
+    */
     void mdmSleep(void);
+    
+    /** Enable the GPS Power supply 
+        \param enable true if supply should be truned on, false if off.
+    */
     void gpsPower(bool enable);
+    
+    /** Reset the GPS
+        \attention use with care and only a last resort.
+    */
     void gpsReset(void);
 
 private:
     // modem pins 
-    DigitalOut      mdmEn;
-    DigitalOut      mdmRst;
-    DigitalOut      mdmPwrOn;
-    DigitalOut      mdmLvlOe;
-    DigitalOut      mdmILvlOe;
-    DigitalOut      mdmUsbDet;
-    bool            mdmIsEnabled;
-    bool            mdmUseUsb;
+    DigitalOut      mdmEn;        //!< The modem LDO enable pin
+    DigitalOut      mdmRst;       //!< The modem reset pin
+    DigitalOut      mdmPwrOn;     //!< The power constrol pin of the modem
+    DigitalOut      mdmLvlOe;     //!< The modem IO level shifter output enable (UART, GPIOs, active low)
+    DigitalOut      mdmILvlOe;    //!< The modem I2C level shifter output enable (I2C, active high)
+    DigitalOut      mdmUsbDet;    //!< The USB interface enable (active high)
+    bool            mdmIsEnabled; //!< Flag to remember if modem was enabled
+    bool            mdmUseUsb;    //!< Flag to remember if USB pins were enabled
     // gps pins
-    DigitalOut      gpsEn;
-    DigitalOut      gpsRst;
-    bool            gpsIsEnabled;
+    DigitalOut      gpsEn;        //!< The GPS LDO enable pin
+    DigitalOut      gpsRst;       //!< The GPS reset pin
+    bool            gpsIsEnabled; //!< Flag to remember if GPS was enabled
 };