seeedstudio ARCH GPRS Demo. post data to yeelink.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ARCH_GPRS_HW.h Source File

ARCH_GPRS_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_HW_H__
00024 #define __ARCH_GPRS_HW_H__
00025 
00026 #include "ARCH_GPRS_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 EG10_PWRON();                              // power on eg10
00036     void EG10_PWROFF();                             // power off eg10, cut the power
00037     void EG10_ON();                                 // turn on eg10
00038     void EG10_OFF();                                // turn off eg10
00039     int getEG10_State();                            // get state of eg10
00040     void EG10StateLed(unsigned char state);         // control led
00041 
00042         int readChrgState();
00043     float readBatVol();
00044     void userLed(unsigned char led, unsigned char state);
00045     void grovePwrOn();
00046     void grovePwrOff();
00047 };
00048 
00049 extern IOT_HW iot_hw;
00050 
00051 #endif
00052 
00053 /*********************************************************************************************************
00054   END FILE
00055 *********************************************************************************************************/