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.
Dependents: Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more
Diff: targets/TARGET_NUVOTON/TARGET_M451/i2c_api.c
- Revision:
- 176:447f873cad2f
- Parent:
- 160:d5399cc887bb
diff -r af195413fb11 -r 447f873cad2f targets/TARGET_NUVOTON/TARGET_M451/i2c_api.c
--- a/targets/TARGET_NUVOTON/TARGET_M451/i2c_api.c Wed Oct 11 12:45:49 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_M451/i2c_api.c Wed Oct 25 14:53:38 2017 +0100
@@ -339,25 +339,6 @@
return inten_back;
}
-int i2c_allow_powerdown(void)
-{
- uint32_t modinit_mask = i2c_modinit_mask;
- while (modinit_mask) {
- int i2c_idx = nu_ctz(modinit_mask);
- const struct nu_modinit_s *modinit = i2c_modinit_tab + i2c_idx;
- struct nu_i2c_var *var = (struct nu_i2c_var *) modinit->var;
- if (var->obj) {
- // Disallow entering power-down mode if I2C transfer is enabled.
- if (i2c_active(var->obj)) {
- return 0;
- }
- }
- modinit_mask &= ~(1 << i2c_idx);
- }
-
- return 1;
-}
-
static int i2c_do_tran(i2c_t *obj, char *buf, int length, int read, int naklastdata)
{
if (! buf || ! length) {


