Psi Swarm robot library version 0.9

Dependents:   PsiSwarm_V9_Blank

Fork of PsiSwarmV9 by James Hilder

Committer:
richardredpath
Date:
Mon Jul 08 10:50:40 2019 +0000
Revision:
20:2b6ebe60929d
Parent:
16:50686c07ad07
Fixed deprecated warnings for callbacks throughout the library

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 11:312663037b8c 1 /* University of York Robotics Laboratory PsiSwarm Library: I2C Setup Header File
jah128 0:d6269d17c8cf 2 *
jah128 16:50686c07ad07 3 * Copyright 2017 University of York
jah128 6:b340a527add9 4 *
jah128 6:b340a527add9 5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
jah128 6:b340a527add9 6 * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
jah128 6:b340a527add9 7 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS
jah128 6:b340a527add9 8 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
jah128 6:b340a527add9 9 * See the License for the specific language governing permissions and limitations under the License.
jah128 6:b340a527add9 10 *
jah128 11:312663037b8c 11 * File: i2c_setup.h
jah128 0:d6269d17c8cf 12 *
jah128 0:d6269d17c8cf 13 * (C) Dept. Electronics & Computer Science, University of York
jah128 0:d6269d17c8cf 14 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis
jah128 0:d6269d17c8cf 15 *
jah128 16:50686c07ad07 16 * PsiSwarm Library Version: 0.9
jah128 0:d6269d17c8cf 17 *
jah128 16:50686c07ad07 18 * June 2017
jah128 0:d6269d17c8cf 19 *
jah128 0:d6269d17c8cf 20 *
jah128 0:d6269d17c8cf 21 */
jah128 0:d6269d17c8cf 22
jah128 0:d6269d17c8cf 23 #ifndef I2C_H
jah128 0:d6269d17c8cf 24 #define I2C_H
jah128 0:d6269d17c8cf 25
jah128 11:312663037b8c 26 /**
jah128 11:312663037b8c 27 * The Setup class contains internal functions that initiate the I2C components on the robot and send
jah128 11:312663037b8c 28 * the low level messages to read\write to these components. The functions within this class are
jah128 11:312663037b8c 29 * intended to be used by other classes to provide higher level functionality, so are not documented in
jah128 11:312663037b8c 30 * the API.
jah128 11:312663037b8c 31 */
jah128 11:312663037b8c 32 class Setup
jah128 11:312663037b8c 33 {
jah128 11:312663037b8c 34 public:
jah128 0:d6269d17c8cf 35 char get_dc_status(void);
jah128 0:d6269d17c8cf 36
jah128 0:d6269d17c8cf 37 char IF_setup_led_expansion_ic(void);
jah128 0:d6269d17c8cf 38 void IF_setup_gpio_expansion_ic(void);
jah128 0:d6269d17c8cf 39
jah128 0:d6269d17c8cf 40 void IF_read_aux_ic_data(void);
jah128 0:d6269d17c8cf 41 void IF_parse_gpio_byte0(char byte);
jah128 0:d6269d17c8cf 42 void IF_parse_gpio_byte1(char byte);
jah128 0:d6269d17c8cf 43 void IF_handle_gpio_interrupt(void);
jah128 0:d6269d17c8cf 44 void IF_update_gpio_inputs(void);
jah128 0:d6269d17c8cf 45 void IF_set_base_LED(char state);
jah128 0:d6269d17c8cf 46 void IF_set_IR_emitter_output(char emitter, char state);
jah128 0:d6269d17c8cf 47 unsigned short IF_read_IR_adc_value(char adc, char index);
jah128 0:d6269d17c8cf 48 char IF_is_switch_pressed(void);
jah128 0:d6269d17c8cf 49 char IF_get_switch_state(void);
jah128 0:d6269d17c8cf 50 void IF_write_to_led_ic(char byte_0, char byte_1);
jah128 0:d6269d17c8cf 51 void IF_setup_temperature_sensor(void);
jah128 0:d6269d17c8cf 52 float IF_read_from_temperature_sensor(void);
jah128 11:312663037b8c 53 };
jah128 0:d6269d17c8cf 54 #endif