[riot-notifications] [RIOT-OS/RIOT] TI CC3200 SimpleLink RIOT support (#11866)

benpicco notifications at github.com
Mon Sep 16 22:59:11 CEST 2019


benpicco commented on this pull request.



> +    /* write to pin at portBase + pinOffset */
+    HWREG(portAddr + (ipin << 2)) =
+            _gpio_pin_value_mask(pin_to_gpio_num[gpio_pin_num(dev)], value);
+}
+
+/**
+ * @brief read a pins value
+ *
+ * @param dev external pin
+ * @return int current value of a pin
+ */
+int gpio_read(gpio_t dev)
+{
+    uint8_t port           = gpio_port_num(dev);
+    unsigned char ipin     = gpio_pin_mask(dev);
+    unsigned long portAddr = (unsigned long)gpio_port_by_num(port);

Again, use the integer types with defined size for register variables.
It doesn't make any difference as by definition this code will only run on a single platform, but it's a question of style ;)

-- 
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/11866#pullrequestreview-288897137
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190916/32e7fa68/attachment.htm>


More information about the notifications mailing list