Library for the PsiSwarm Robot - Version 0.7

Dependents:   PsiSwarm_V7_Blank

Fork of PsiSwarmLibrary by James Hilder

Committer:
jah128
Date:
Sat Oct 15 13:51:39 2016 +0000
Revision:
6:b340a527add9
Parent:
5:3cdd1a37cdd7
Added Apache license to files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jah128 0:d6269d17c8cf 1 /* University of York Robotics Laboratory PsiSwarm Library: Serial Control Header File
jah128 0:d6269d17c8cf 2 *
jah128 6:b340a527add9 3 * Copyright 2016 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 0:d6269d17c8cf 11 * File: serial.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 5:3cdd1a37cdd7 16 * PsiSwarm Library Version: 0.7
jah128 0:d6269d17c8cf 17 *
jah128 5:3cdd1a37cdd7 18 * October 2016
jah128 0:d6269d17c8cf 19 *
jah128 0:d6269d17c8cf 20 *
jah128 0:d6269d17c8cf 21 */
jah128 0:d6269d17c8cf 22
jah128 0:d6269d17c8cf 23
jah128 0:d6269d17c8cf 24 #ifndef SERIAL_H
jah128 0:d6269d17c8cf 25 #define SERIAL_H
jah128 0:d6269d17c8cf 26
jah128 0:d6269d17c8cf 27 void handle_user_serial_message(char * message, char length, char interface);
jah128 0:d6269d17c8cf 28
jah128 1:060690a934a9 29 void IF_start_file_transfer_mode(void);
jah128 1:060690a934a9 30 void IF_end_file_transfer_mode(void);
jah128 1:060690a934a9 31 void IF_file_transfer_timeout(void);
jah128 0:d6269d17c8cf 32 void IF_handle_file_transfer_serial_message(char * message, char length, char interface);
jah128 0:d6269d17c8cf 33 void IF_handle_user_serial_message(char * message, char length, char interface);
jah128 0:d6269d17c8cf 34 void IF_handle_command_serial_message(char message [3], char interface);
jah128 0:d6269d17c8cf 35 void IF_setup_serial_interfaces(void);
jah128 0:d6269d17c8cf 36 void IF_pc_rx_callback(void);
jah128 0:d6269d17c8cf 37 void IF_bt_rx_callback(void);
jah128 0:d6269d17c8cf 38
jah128 0:d6269d17c8cf 39 char * IF_nibble_to_binary_char(char in);
jah128 0:d6269d17c8cf 40 char * IF_char_to_binary_char(char in);
jah128 0:d6269d17c8cf 41 float IF_decode_unsigned_float(char byte0, char byte1);
jah128 0:d6269d17c8cf 42 float IF_decode_float(char byte0, char byte1);
jah128 0:d6269d17c8cf 43 float IF_decode_float(char byte0);
jah128 0:d6269d17c8cf 44 float IF_decode_unsigned_float(char byte0);
jah128 2:c6986ee3c7c5 45 void IF_set_filename(char * filename_in);
jah128 2:c6986ee3c7c5 46 unsigned short IF_calculateCRC16(int file_length);
jah128 0:d6269d17c8cf 47
jah128 0:d6269d17c8cf 48
jah128 0:d6269d17c8cf 49 #endif