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.
Diff: main.cpp
- Revision:
- 236:fd7961dfa78a
- Parent:
- 235:c831718303c9
- Child:
- 237:c2cfe349f5c1
diff -r c831718303c9 -r fd7961dfa78a main.cpp
--- a/main.cpp Mon Jun 14 10:36:29 2021 +0000
+++ b/main.cpp Fri Jun 25 12:21:04 2021 +0000
@@ -215,11 +215,11 @@
pc.baud(9600);
// i2c init
-// i2c.frequency(400 * 1000); // 0.4 mHz
-// wait_ms(2); // Power Up wait
-// look_for_hardware_i2c(); // Hardware present
-// init_as5510(i2c_slave_addr1);
-// make_delay();
+ i2c.frequency(400 * 1000); // 0.4 mHz
+ wait_ms(2); // Power Up wait
+ look_for_hardware_i2c(); // Hardware present
+ init_as5510(i2c_slave_addr1);
+ make_delay();
// spi init
eeprom_cs = 1;
@@ -310,10 +310,10 @@
// timer_while ++;
//i2c for SW valve
- //if(OPERATING_MODE == 5) {
-// read_field(i2c_slave_addr1);
-// if(DIR_VALVE_ENC < 0) value = 1023 - value;
-// }
+ if(OPERATING_MODE == 5) {
+ read_field(i2c_slave_addr1);
+ if(DIR_VALVE_ENC < 0) value = 1023 - value;
+ }
}
}