[riot-notifications] [RIOT-OS/RIOT] drivers: support for NXP PCA9685 I2C 16-channel, 12-bit PWM controller (#10556)

Gunar Schorcht notifications at github.com
Sat Sep 7 11:17:38 CEST 2019


gschorcht commented on this pull request.



> +
+    return PCA9685_OK;
+}
+
+inline static int _write_word(const pca9685_t *dev, uint8_t reg, uint16_t data)
+{
+    uint8_t bytes[2] = { data & 0xff, (data >> 8) & 0xff };
+    return _write (dev, reg, (uint8_t*)&bytes, 2);
+}
+
+static int _update(const pca9685_t *dev, uint8_t reg, uint8_t mask, uint8_t data)
+{
+    uint8_t byte;
+    uint8_t shift = 0;
+
+    while (!((mask >> shift) & 0x01)) {

Yeah, indeed :sunglasses: 

-- 
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/10556#discussion_r321962250
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190907/41a1ae1e/attachment-0001.htm>


More information about the notifications mailing list