[riot-notifications] [RIOT-OS/RIOT] drivers: support for NXP PCA9685 I2C 16-channel, 12-bit PWM controller (#10556)
notifications at github.com
Sat Sep 7 16:20:19 CEST 2019
benpicco commented on this pull request.
+ /* read current register value */
+ EXEC_RET(_read(dev, reg, &byte, 1));
+ /* set masked bits to the given value */
+ _set_reg_bit(&byte, mask, data);
+ /* write back new register value */
+ EXEC_RET(_write(dev, reg, &byte, 1));
+ return PCA9685_OK;
+static void _set_reg_bit(uint8_t *byte, uint8_t mask, uint8_t bit)
+ ASSERT_PARAM(byte != NULL);
Seems a bit excessive, this is an internal function that gets only called on local variables.
Maybe the compiler will even optimise it away.
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications