![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Lets you control your mbed from an easy to use GUI. Entire project is on git hub: https://github.com/navin-bhaskar/Controller For usage info follow this link http://navinbhaskar.blogspot.in/2013/02/arduino-controller-3.html
MbedPerAccess.h
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 2 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * This program is distributed in the hope that it will be useful, 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 * GNU General Public License for more details. 00011 * 00012 * You should have received a copy of the GNU General Public License 00013 * along with this program; if not, write to the Free Software 00014 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00015 * MA 02110-1301, USA. 00016 * 00017 */ 00018 00019 /** 00020 * \brief Implements the mbed perephiral access interface 00021 * \author Navin Bhaskar 00022 */ 00023 00024 #ifndef _ARD_PER_ACCESS_H 00025 #define _ARD_PER_ACCESS_H 00026 00027 #include "PerAccess.h" 00028 #include "error.h" 00029 00030 #ifndef MBED 00031 #define MBED /**< Build for mbed */ 00032 #endif 00033 00034 class MbedPerAccess : public PerAccess 00035 { 00036 public: 00037 virtual uint digitalOut(uint pinNo, uint val); 00038 virtual uint digitalIn(uint pinNo, uint * val); 00039 virtual uint analogOut(uint pinNo, uint val); 00040 virtual uint analogIn(uint pinNo, uint * outVal); 00041 private: 00042 #ifdef ARDUINO 00043 static const uint _maxDigiPins = 14; /**< Maximun number of digital pins */ 00044 static const uint _maxAnInPins = 6; /**< Maximum number of ADC channels */ 00045 static const uint _maxAnOutVal = 255; /**< Maximum value that can be output by the PWM uint */ 00046 #elif defined (MBED) 00047 static const uint _maxDigiOutPins = 25; /**< Maximun number of digital out pins */ 00048 static const uint _maxDigiInPins = 25-4; /**< Maximum number of digital in pins */ 00049 static const uint _maxAnInPins = 6; /**< Maximum number of ADC channels */ 00050 static const uint _maxAnOutVal = 1024; /**< Maximum value that can be output by the ADC uint */ 00051 #endif 00052 00053 00054 }; 00055 00056 #endif 00057
Generated on Thu Jul 21 2022 02:52:18 by
![doxygen](doxygen.png)