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.
Revision 5:315872eec0ae, committed 2020-03-28
- Comitter:
- skyscraper
- Date:
- Sat Mar 28 11:19:53 2020 +0000
- Parent:
- 4:d8f51b136dbd
- Child:
- 6:0b18a49e03b9
- Commit message:
- try doc update out
Changed in this revision
| I2CEeprom.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/I2CEeprom.h Sat Mar 28 01:50:44 2020 +0000
+++ b/I2CEeprom.h Sat Mar 28 11:19:53 2020 +0000
@@ -30,18 +30,21 @@
public:
/// Constructor to create a new instance of the class.
/// @param i2c a reference to the i2c bus the chip is connected to.
- /// @param address The 8bit I2C address of the chip in the range 0xA0 - 0xAE.
+ /// @param address The 8bit I2C address of the chip
/// @param pageSize The size of the page used in writing to the chip.
- /// @param chipSize The size of the memory in the chip to allow range checkng. Set to
- /// 0 to disable checks.
- /// @param The write cycle time in ms.
+ /// @param chipSize The size of the memory in the chip for range check.
+ /// Set to 0 to disable checks.
+ /// @param writeCycleTime_ms The write cycle time in ms. After a write
+ /// The thread will be put to sleep for this time before being polled
+ /// at 1 ms intervals to check the write has completed.
/// TODO : Could use bus frequency to cap the speed of the bus
+ /// Would need a way to read bus frequency
I2CEeprom(
I2C& i2c,
int address,
size_t pageSize,
size_t chipSize,
- uint8_t write_cycle_time_ms);
+ uint8_t writeCycleTime_ms);
/// Read a single byte from the address in memory.
/// @param address Memory address to read from.
@@ -72,6 +75,8 @@
size_t write(size_t address, char value);
/// Write multiple bytes starting from the address in memory.
+ /// Note that in this implementation, a buffer is allocated on the heap
+ /// for the
/// @param address Memory address to start writting to.
/// @param buffer Pointer to buffer holding the bytes to write to memory.
/// @param size Number of bytes to be written to memory.