[riot-notifications] [RIOT-OS/RIOT] [RFC] pkg/cryptoauthlib: wake pulse implementation for SAM0 CPUs (#13412)

benpicco notifications at github.com
Tue May 5 20:09:51 CEST 2020


@benpicco commented on this pull request.

Needs a rebase and fix for the final API now that #13421 is merged 

> @@ -146,9 +146,24 @@ ATCA_STATUS hal_i2c_wake(ATCAIface iface)
     ATCAIfaceCfg *cfg = atgetifacecfg(iface);
     uint8_t data[4] = { 0 };
 
+#ifdef MODULE_PERIPH_I2C_RECONFIGURE
+    /* switch I2C peripheral to GPIO function */
+    i2c_deinit(cfg->atcai2c.bus);

```suggestion
    i2c_deinit_pins(cfg->atcai2c.bus);
```

> @@ -146,9 +146,24 @@ ATCA_STATUS hal_i2c_wake(ATCAIface iface)
     ATCAIfaceCfg *cfg = atgetifacecfg(iface);
     uint8_t data[4] = { 0 };
 
+#ifdef MODULE_PERIPH_I2C_RECONFIGURE
+    /* switch I2C peripheral to GPIO function */
+    i2c_deinit(cfg->atcai2c.bus);
+    gpio_init(i2c_pin_sda(cfg->atcai2c.bus), GPIO_OUT);
+
+    /* send wake pulse of 100us (t_WOL) */
+    gpio_clear(i2c_pin_sda(cfg->atcai2c.bus));
+    atca_delay_us(100);
+
+    /* reinit I2C peripheral */
+    i2c_init(cfg->atcai2c.bus);

```suggestion
    i2c_init_pins(cfg->atcai2c.bus);
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/13412#pullrequestreview-406033996
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20200505/8c8ee787/attachment-0001.htm>


More information about the notifications mailing list