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 LG by
Diff: DeviceI2C.c
- Revision:
- 167:bedc0a9d559a
- Parent:
- 161:efd949e8d536
- Child:
- 186:c7a9c309086c
diff -r c3c0b8a90d81 -r bedc0a9d559a DeviceI2C.c
--- a/DeviceI2C.c Sun May 22 18:59:20 2016 +0000
+++ b/DeviceI2C.c Sun Jun 05 11:03:33 2016 +0000
@@ -30,12 +30,11 @@
// ...
//
-void InitI2CWithDefaults(void){
+void InitI2CDefaultSettings(void){
device.controller.I2C.settings.trigger = 1000;
}
-void InitI2C(void) {
- device.controller.I2C.state.CON0 = 0;
+void InitI2CState(void) {
device.controller.I2C.state.buffer[0] = I2C_A_ADDRESS;
device.controller.I2C.state.buffer[1] = I2C_WRITE_CMD;
device.controller.I2C.state.buffer[2] = device.isacs.potentiometers.settings.a;
@@ -45,7 +44,9 @@
device.controller.I2C.state.position = 0;
device.controller.I2C.state.counter = 0;
device.controller.I2C.state.trigger = device.controller.I2C.settings.trigger;
-
+}
+
+void DeviceStartI2C(void) {
LPC_SC->PCONP |= (1 << 7);//I2C0 on
//LPC_SC->PCONP |= (1 << 19);//I2C1 on
