[riot-notifications] [RIOT-OS/RIOT] drivers/hm3301: initial commit (#16333)

Francisco notifications at github.com
Wed Jun 2 08:46:12 CEST 2021


@fjmolinas commented on this pull request.



> +        .nc_pm_5    = (buf[24] << 8) | buf[25],
+        .nc_pm_10   = (buf[26] << 8) | buf[27],
+    };
+    memcpy(data, &tmp, sizeof(hm3301_data_t));
+
+    return 0;
+}
+
+void hm3301_reset(hm3301_t *dev)
+{
+    if (gpio_is_valid(dev->params.reset_pin)) {
+        gpio_clear(dev->params.reset_pin);
+#if IS_USED(MODULE_ZTIMER_USEC)
+        ztimer_sleep(ZTIMER_USEC, HM3301_RESET_TIME_US);
+#else
+        for (uint32_t i = 0; i < HM3301_RESET_TIME_US * (CLOCK_CORECLOCK / US_PER_SEC) ; i++) {

Ok then I'll blacklist hifive, if you insist that much.


-- 
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/16333#discussion_r643696100
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210601/9b187d16/attachment.htm>


More information about the notifications mailing list