mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
19631: drivers/dfplayer: fix bug in utility function r=maribu a=maribu ### Contribution description Apparently, those functions have never been used. Otherwise this obvious bug wouldn't have sailed unnoticed for so long. 19632: drivers/pcf857x: fix error handling r=maribu a=maribu ### Contribution description This fixes a typo/copy paste error in the error handling. Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
This commit is contained in:
commit
24593ce18c
@ -240,16 +240,16 @@ static inline int dfplayer_source_set_contains(dfplayer_source_set_t set,
|
||||
return (set & (0x01 << src)) ? 1 : 0;
|
||||
}
|
||||
|
||||
static inline void dfplayer_source_set_add(dfplayer_source_set_t set,
|
||||
static inline void dfplayer_source_set_add(dfplayer_source_set_t *set,
|
||||
dfplayer_source_t src)
|
||||
{
|
||||
set |= 0x01 << src;
|
||||
*set |= 0x01 << src;
|
||||
}
|
||||
|
||||
static inline void dfplayer_source_set_rm(dfplayer_source_set_t set,
|
||||
static inline void dfplayer_source_set_rm(dfplayer_source_set_t *set,
|
||||
dfplayer_source_t src)
|
||||
{
|
||||
set &= ~((dfplayer_source_set_t)(0x01 << src));
|
||||
*set &= ~((dfplayer_source_set_t)(0x01 << src));
|
||||
}
|
||||
#endif /* !DOXYGEN */
|
||||
|
||||
|
@ -752,7 +752,7 @@ static inline int dfplayer_source_set_contains(dfplayer_source_set_t set,
|
||||
*
|
||||
* This function is idempotent
|
||||
*/
|
||||
static inline void dfplayer_source_set_add(dfplayer_source_set_t set,
|
||||
static inline void dfplayer_source_set_add(dfplayer_source_set_t *set,
|
||||
dfplayer_source_t src);
|
||||
|
||||
/**
|
||||
@ -763,7 +763,7 @@ static inline void dfplayer_source_set_add(dfplayer_source_set_t set,
|
||||
*
|
||||
* This function is idempotent
|
||||
*/
|
||||
static inline void dfplayer_source_set_rm(dfplayer_source_set_t set,
|
||||
static inline void dfplayer_source_set_rm(dfplayer_source_set_t *set,
|
||||
dfplayer_source_t src);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -141,7 +141,7 @@ int pcf857x_init(pcf857x_t *dev, const pcf857x_params_t *params)
|
||||
|
||||
_release(dev);
|
||||
|
||||
return PCF857X_OK;
|
||||
return res;
|
||||
}
|
||||
|
||||
int pcf857x_gpio_init(pcf857x_t *dev, gpio_t pin, gpio_mode_t mode)
|
||||
|
Loading…
Reference in New Issue
Block a user