Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of PsiSwarm-Headstart by
serial.h@2:c6986ee3c7c5, 2016-03-11 (annotated)
- Committer:
- jah128
- Date:
- Fri Mar 11 13:51:24 2016 +0000
- Revision:
- 2:c6986ee3c7c5
- Parent:
- 1:060690a934a9
Added Alex' IR functions
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jah128 | 0:d6269d17c8cf | 1 | /* University of York Robotics Laboratory PsiSwarm Library: Serial Control Header File |
jah128 | 0:d6269d17c8cf | 2 | * |
jah128 | 0:d6269d17c8cf | 3 | * File: serial.h |
jah128 | 0:d6269d17c8cf | 4 | * |
jah128 | 0:d6269d17c8cf | 5 | * (C) Dept. Electronics & Computer Science, University of York |
jah128 | 0:d6269d17c8cf | 6 | * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis |
jah128 | 0:d6269d17c8cf | 7 | * |
jah128 | 2:c6986ee3c7c5 | 8 | * PsiSwarm Library Version: 0.41 |
jah128 | 0:d6269d17c8cf | 9 | * |
jah128 | 2:c6986ee3c7c5 | 10 | * March 2016 |
jah128 | 0:d6269d17c8cf | 11 | * |
jah128 | 0:d6269d17c8cf | 12 | * |
jah128 | 0:d6269d17c8cf | 13 | */ |
jah128 | 0:d6269d17c8cf | 14 | |
jah128 | 0:d6269d17c8cf | 15 | |
jah128 | 0:d6269d17c8cf | 16 | #ifndef SERIAL_H |
jah128 | 0:d6269d17c8cf | 17 | #define SERIAL_H |
jah128 | 0:d6269d17c8cf | 18 | |
jah128 | 0:d6269d17c8cf | 19 | void handle_user_serial_message(char * message, char length, char interface); |
jah128 | 0:d6269d17c8cf | 20 | |
jah128 | 1:060690a934a9 | 21 | void IF_start_file_transfer_mode(void); |
jah128 | 1:060690a934a9 | 22 | void IF_end_file_transfer_mode(void); |
jah128 | 1:060690a934a9 | 23 | void IF_file_transfer_timeout(void); |
jah128 | 0:d6269d17c8cf | 24 | void IF_handle_file_transfer_serial_message(char * message, char length, char interface); |
jah128 | 0:d6269d17c8cf | 25 | void IF_handle_user_serial_message(char * message, char length, char interface); |
jah128 | 0:d6269d17c8cf | 26 | void IF_handle_command_serial_message(char message [3], char interface); |
jah128 | 0:d6269d17c8cf | 27 | void IF_setup_serial_interfaces(void); |
jah128 | 0:d6269d17c8cf | 28 | void IF_pc_rx_callback(void); |
jah128 | 0:d6269d17c8cf | 29 | void IF_bt_rx_callback(void); |
jah128 | 0:d6269d17c8cf | 30 | |
jah128 | 0:d6269d17c8cf | 31 | char * IF_nibble_to_binary_char(char in); |
jah128 | 0:d6269d17c8cf | 32 | char * IF_char_to_binary_char(char in); |
jah128 | 0:d6269d17c8cf | 33 | float IF_decode_unsigned_float(char byte0, char byte1); |
jah128 | 0:d6269d17c8cf | 34 | float IF_decode_float(char byte0, char byte1); |
jah128 | 0:d6269d17c8cf | 35 | float IF_decode_float(char byte0); |
jah128 | 0:d6269d17c8cf | 36 | float IF_decode_unsigned_float(char byte0); |
jah128 | 2:c6986ee3c7c5 | 37 | void IF_set_filename(char * filename_in); |
jah128 | 2:c6986ee3c7c5 | 38 | unsigned short IF_calculateCRC16(int file_length); |
jah128 | 0:d6269d17c8cf | 39 | |
jah128 | 0:d6269d17c8cf | 40 | |
jah128 | 0:d6269d17c8cf | 41 | #endif |