NIBO Library 2.11
|
00001 // 00002 // Nibo C drivers - C functions for the Nibo robot 00003 // 00004 // Copyright (C) 2007 by Nils Springob <nils@nicai-systems.de> 00005 // 00006 // This program is free software; you can redistribute it and/or modify 00007 // it under the terms of the GNU General Public License as published by 00008 // the Free Software Foundation; either version 2 of the License, or 00009 // (at your option) any later version. 00010 // 00011 // This program is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with this program; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 00026 #ifndef NIBOCC_IRCO_HPP_ 00027 #define NIBOCC_IRCO_HPP_ 00028 #if defined(NIBOCC_USE_IRCO) || defined (DOXYGEN) 00029 00030 #include <stdint.h> 00031 #include "nibo/irco.h" 00032 00033 namespace nibocc { 00034 00038 class IrCo 00039 { 00040 public: 00041 enum { 00042 PASSIVE = 0, 00043 RC5TX = 1, 00044 MEASURE = 2, 00045 }; 00049 static uint8_t get_mode() {return ::irco_mode;} 00050 00054 static uint8_t get_distance(uint8_t id) {return ::irco_distance[id];} 00055 00059 static uint16_t get_rc5_cmd() {return ::irco_rc5_cmd;} 00060 00064 static uint8_t update() {return ::irco_update();} 00065 00069 static uint8_t stop() {return ::irco_stop();} 00070 00074 static uint8_t start_measure() {return ::irco_startMeasure();} 00075 00080 static uint8_t transmit_rc5(uint16_t rc5) {return ::irco_transmitRC5(rc5);} 00081 00082 }; 00083 00084 } // namespace 00085 #endif // NIBOCC_USE_IRCO 00086 #endif // NIBOCC_IRCO_HPP_