[riot-notifications] [RIOT-OS/RIOT] Driver for INA3221 current and power and bus voltage monitor (#12055)

fabian18 notifications at github.com
Fri Sep 20 09:48:19 CEST 2019


fabian18 commented on this pull request.



> +
+/**
+ * @brief Convert register value to shunt voltage in uV
+ * 
+ * @param[in]   reg_val Register value
+ * 
+ * @pre         reg_val must be in host byte order
+ * 
+ * @returm      Shunt voltage in uV
+ */
+static inline int32_t reg_val_to_shunt_voltage_uV(int16_t reg_val)
+{
+    assert(reg_val <= INA3221_MAX_SHUNT_REG_VAL);
+
+    return reg_val / 8 * INA3221_SHUNT_VOLTAGE_PRECISION_uV;
+}


>       * Missing spaces e.g. between `if` and `(`. You can use `uncrustify` to address these.
I would like to uncrustify before it is about to get merged


-- 
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/12055#discussion_r326508675
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190920/a2b46387/attachment.htm>


More information about the notifications mailing list