Arch GPRS V2 HW Library Created from the Arch GPRS HW DEMO

Dependents:   roam_v2 finalV1 finalV1 finalv2 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ARCH_GPRS_V2_HW.h Source File

ARCH_GPRS_V2_HW.h

00001 /*
00002   IOT_hw.h
00003   2013 Copyright (c) Seeed Technology Inc.  All right reserved.
00004 
00005   Author:Loovee
00006   2013-7-21
00007 
00008   This library is free software; you can redistribute it and/or
00009   modify it under the terms of the GNU Lesser General Public
00010   License as published by the Free Software Foundation; either
00011   version 2.1 of the License, or (at your option) any later version.
00012 
00013   This library is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016   Lesser General Public License for more details.
00017 
00018   You should have received a copy of the GNU Lesser General Public
00019   License along with this library; if not, write to the Free Software
00020   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 */
00022 
00023 #ifndef __ARCH_GPRS_V2_HW_H__
00024 #define __ARCH_GPRS_V2_HW_H__
00025 
00026 #include "ARCH_GPRS_V2_HW_DFS.h"
00027 
00028 class IOT_HW{
00029 
00030 private:
00031 
00032 public:
00033     int init();                                     // init all
00034     void init_io();                                 // init io
00035     void SIM900_PWRON();                              // power on sim900
00036     void SIM900_PWROFF();                             // power off sim900, cut the power
00037     void SIM900_ON();                                 // turn on sim900
00038     void SIM900_OFF();                                // turn off sim900
00039     void SIM900StateLed(unsigned char state);         // control led
00040     
00041     void sendCommand(char * number);
00042     void hangup();
00043 
00044         int readChrgState();
00045     float readBatVol();
00046     void userLed(unsigned char led, unsigned char state);
00047     void grovePwrOn();
00048     void grovePwrOff();
00049 };
00050 
00051 extern IOT_HW iot_hw;
00052 
00053 #endif
00054 
00055 /*********************************************************************************************************
00056   END FILE
00057 *********************************************************************************************************/