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 PsiSwarmLibrary by
eprom.h
00001 /** University of York Robotics Laboratory PsiSwarm Library: Eprom Functions Header File 00002 * 00003 * File: eprom.h 00004 * 00005 * (C) Dept. Electronics & Computer Science, University of York 00006 * James Hilder, Alan Millard, Alexander Horsfield, Homero Elizondo, Jon Timmis 00007 * 00008 * PsiSwarm Library Version: 0.41 00009 * 00010 * March 2016 00011 * 00012 * Functions for accessing the 64Kb EPROM chip and reading the reserved firmware block 00013 * 00014 * Example: 00015 * @code 00016 * #include "psiswarm.h" 00017 * 00018 * int main() { 00019 * init(); 00020 * write_eeprom_byte(0,0xDD); //Writes byte 0xDD in EPROM address 0 00021 * char c = read_eeprom_byte(0); //c will hold 0xDD 00022 * //Valid address range is from 0 to 65279 00023 * } 00024 * @endcode 00025 */ 00026 00027 #ifndef EPROM_H 00028 #define EPROM_H 00029 00030 /** Write a single byte to the EPROM 00031 * 00032 * @param address The address to store the data, range 0-65279 00033 * @param data The character to store 00034 */ 00035 void write_eeprom_byte ( int address, char data ); 00036 00037 /** Read a single byte from the EPROM 00038 * 00039 * @param address The address to read from, range 0-65279 00040 * @return The character stored at address 00041 */ 00042 char read_eeprom_byte ( int address ); 00043 00044 /** Read the next byte from the EPROM, to be called after read_eeprom_byte 00045 * 00046 * @return The character stored at address after the previous one read from 00047 */ 00048 char read_next_eeprom_byte ( void ); 00049 00050 /** Read the data stored in the reserved firmware area of the EPROM 00051 * 00052 * @return 1 if a valid firmware is read, 0 otherwise 00053 */ 00054 char read_firmware ( void ); 00055 00056 #endif
Generated on Sat Jul 16 2022 05:17:35 by
1.7.2
