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.
Dependencies: mbed
Revision 3:58bd0878bb0f, committed 2016-01-13
- Comitter:
- kaliczp
- Date:
- Wed Jan 13 09:29:03 2016 +0000
- Parent:
- 2:41fccbb2e863
- Commit message:
- Write more address in a loop
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Tue Jan 12 22:18:21 2016 +0000
+++ b/main.cpp Wed Jan 13 09:29:03 2016 +0000
@@ -22,8 +22,13 @@
data_write[1] = 0;
// Type data
data_write[2] = 1;
- i2c.write(EEPROM_ADDR, data_write, 3);
- wait_ms(6); // Wait eeprom internal write cycle (5ms) + 1ms
+ uint8_t i;
+ for( i=0; i < 255; i++ ) {
+ data_write[1] = i;
+ data_write[2] = i;
+ i2c.write(EEPROM_ADDR, data_write, 3);
+ wait_ms(6); // Wait eeprom internal write cycle (5ms) + 1ms
+ }
// Reset eeprom pointer address
char eeprom_address[2] = {0, 0};
i2c.write(EEPROM_ADDR, eeprom_address, 2, true);