This Automatic mode is the most simple lib for MCU Gear with LPC1114FN28. You don't need to think about Bank.

Dependents:   MCUGearALPC1114FN28

Fork of MCUGearA by mille feuille

Revision:
3:69b10f9cdd14
Parent:
2:aa2e471e8317
--- a/MCUGearALPC1114.cpp	Sat May 03 17:09:14 2014 +0000
+++ b/MCUGearALPC1114.cpp	Tue May 06 15:53:05 2014 +0000
@@ -27,7 +27,7 @@
 
 MCUGear::MCUGear(PinName scl, PinName sda, char addr)
      : _i2c(scl, sda) {
-    //_i2c.frequency(FPGA_I2C_CLOCK);
+    _i2c.frequency(FPGA_I2C_CLOCK);
     _addr = addr;   //save address
     write(0xff);    //close Module gate
     _counter = 0;
@@ -98,6 +98,9 @@
     fpga_write(0x10,_bank);//init regist///////
 }
 
+void MCUGear::clear(void){
+    _counter = 0;
+}
 
 //send I2C signal function
 void MCUGear::write(uint8_t c){