[riot-notifications] [RIOT-OS/RIOT] drivers/lm75: driver for the lm75 sensor and derivatives (#16678)

benpicco notifications at github.com
Tue Jul 27 12:02:26 CEST 2021


@benpicco commented on this pull request.



> +#include "lm75_regs.h"
+#include "lm75_params.h"
+#include "log.h"
+#include "kernel_defines.h"
+#include <stdint.h>
+#include <byteorder.h>
+#include "xtimer.h"
+
+#define I2C_BUS             dev->lm75_params.i2c_bus
+#define I2C_ADDR            dev->lm75_params.i2c_addr
+
+
+int lm75_init(lm75_t *dev, const lm75_params_t *params) {
+
+    /* Enable OS interrupt */
+    gpio_init_int(LM75_PARAM_INT, GPIO_IN_PU, GPIO_FALLING, __irq_os_cb, NULL);

Yes it configures the alarm threshold.
But we only need to configure the alarm GPIO if we set the alarm.

-- 
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/16678#discussion_r677304220
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210727/f885b639/attachment.htm>


More information about the notifications mailing list