NIBO Library  2.11
nibo/copro.h
gehe zur Dokumentation dieser Datei
00001 /*  BSD-License:
00002 
00003 Copyright (c) 2008 by Nils Springob, nicai-systems, Germany
00004 
00005 All rights reserved.
00006 
00007 Redistribution and use in source and binary forms, with or without modification,
00008 are permitted provided that the following conditions are met:
00009 
00010   * Redistributions of source code must retain the above copyright notice,
00011     this list of conditions and the following disclaimer.
00012   * Redistributions in binary form must reproduce the above copyright notice,
00013     this list of conditions and the following disclaimer in the documentation
00014     and/or other materials provided with the distribution.
00015   * Neither the name nicai-systems nor the names of its contributors may be
00016     used to endorse or promote products derived from this software without
00017     specific prior written permission.
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
00020 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
00021 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
00022 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00023 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00024 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00025 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
00026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
00027 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
00028 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
00029 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00030 
00031 */
00032 
00043 #ifndef NIBO_COPRO_H_
00044 #define NIBO_COPRO_H_
00045 #if defined(NIBO_USE_COPRO) || defined (DOXYGEN)
00046 
00047 #include <stdint.h>
00048 
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052 
00056 extern int16_t copro_speed_l;
00057 
00061 extern int16_t copro_speed_r;
00062 
00066 extern int16_t copro_ticks_l;
00067 
00071 extern int16_t copro_ticks_r;
00072 
00076 extern int16_t copro_current_l;
00077 
00081 extern int16_t copro_current_r;
00082 
00087 extern uint16_t copro_target_distance;
00088 
00092 uint8_t copro_update();
00093 
00097 uint8_t copro_stop();
00098 
00102 uint8_t copro_stopImmediate();
00103 
00110 uint8_t copro_setPWM(int16_t left, int16_t right);
00111 
00122 uint8_t copro_setSpeed(int16_t left, int16_t right);
00123 
00131 uint8_t copro_setTargetAbs(int16_t left, int16_t right, uint16_t speed);
00132 
00149 uint8_t copro_setTargetRel(int16_t left, int16_t right, uint16_t speed);
00150 
00160 uint8_t copro_setSpeedParameters(int8_t kp, int8_t ki, int8_t kd);
00161 
00170 uint8_t copro_setPositionParameters(int8_t ki, int8_t kp, int8_t kd);
00171 
00177 uint8_t copro_resetOdometry(int16_t left, int16_t right);
00178 
00179 
00180 
00181 enum {
00182   COPRO_IR_PASSIVE = 0,
00183   COPRO_IR_RC5TX   = 1,
00184   COPRO_IR_MEASURE = 2,
00185 };
00186 
00190 extern uint8_t copro_ir_mode;
00191 
00195 extern uint16_t copro_distance[5];
00196 
00200 extern uint16_t copro_rc5_cmd;
00201 
00205 uint8_t copro_ir_stop();
00206 
00210 uint8_t copro_ir_startMeasure();
00211 
00212 
00223 uint8_t copro_transmitRC5(uint16_t code);
00224 
00225 
00226 
00227 
00228 
00229 
00230 #ifdef __cplusplus
00231 } // extern "C"
00232 #endif
00233 
00234 #endif // NIBO_USE_COPRO
00235 #endif // NIBO_COPRO_H_

Erzeugt am Fre Jun 3 2011 15:48:39 für NIBO Library von doxygen 1.7.4-20110426