[riot-notifications] [RIOT-OS/RIOT] drivers: Add AD7746 capacitance sensor driver (#10919)

Leandro Lanzieri notifications at github.com
Mon Feb 11 11:42:56 CET 2019


leandrolanzieri commented on this pull request.



> +    if (ad7746_read_raw_ch((const ad7746_t *)dev, AD7746_READ_CAP_CH, &raw)) {
+        return -ECANCELED;
+    }
+
+    res->val[0] = ad7746_raw_to_capacitance(raw);
+    res->unit = UNIT_F;
+    res->scale = -15;
+
+    return 1;
+}
+
+const saul_driver_t ad7746_saul_driver = {
+    .read = _read,
+    .write = saul_notsup,
+    .type = SAUL_SENSE_CAP,
+};

Added temperature and voltage to SAUL

-- 
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/10919#discussion_r255452620
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190211/743575bd/attachment.html>


More information about the notifications mailing list