C++ Library for the PsiSwarm Robot - Version 0.8
Dependents: PsiSwarm_V8_Blank_CPP Autonomia_RndmWlk
Fork of PsiSwarmV7_CPP by
i2c_setup.h
00001 /* University of York Robotics Laboratory PsiSwarm Library: I2C Setup Header File 00002 * 00003 * Copyright 2016 University of York 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 00007 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS 00008 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00009 * See the License for the specific language governing permissions and limitations under the License. 00010 * 00011 * File: i2c_setup.h 00012 * 00013 * (C) Dept. Electronics & Computer Science, University of York 00014 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis 00015 * 00016 * PsiSwarm Library Version: 0.8 00017 * 00018 * October 2016 00019 * 00020 * 00021 */ 00022 00023 #ifndef I2C_H 00024 #define I2C_H 00025 00026 /** 00027 * The Setup class contains internal functions that initiate the I2C components on the robot and send 00028 * the low level messages to read\write to these components. The functions within this class are 00029 * intended to be used by other classes to provide higher level functionality, so are not documented in 00030 * the API. 00031 */ 00032 class Setup 00033 { 00034 public: 00035 char get_dc_status(void); 00036 00037 char IF_setup_led_expansion_ic(void); 00038 void IF_setup_gpio_expansion_ic(void); 00039 00040 void IF_read_aux_ic_data(void); 00041 void IF_parse_gpio_byte0(char byte); 00042 void IF_parse_gpio_byte1(char byte); 00043 void IF_handle_gpio_interrupt(void); 00044 void IF_update_gpio_inputs(void); 00045 void IF_set_base_LED(char state); 00046 void IF_set_IR_emitter_output(char emitter, char state); 00047 unsigned short IF_read_IR_adc_value(char adc, char index); 00048 char IF_is_switch_pressed(void); 00049 char IF_get_switch_state(void); 00050 void IF_write_to_led_ic(char byte_0, char byte_1); 00051 void IF_setup_temperature_sensor(void); 00052 float IF_read_from_temperature_sensor(void); 00053 }; 00054 #endif
Generated on Tue Jul 12 2022 21:11:24 by 1.7.2