Cosmetic changes from review of last 2 PRs.
This commit is contained in:
parent
cabb529c48
commit
96b6bf92a3
@ -152,7 +152,6 @@ int stm32_rgbled_setup(void)
|
||||
info.frequency = 100;
|
||||
|
||||
#ifdef CONFIG_PWM_MULTICHAN
|
||||
|
||||
/* Setup the duty cycle and channel for red */
|
||||
|
||||
i = 0;
|
||||
@ -174,7 +173,8 @@ int stm32_rgbled_setup(void)
|
||||
}
|
||||
|
||||
/* Start the timer used for red, and any other colors that are
|
||||
* sourced on a different channel of the same timer */
|
||||
* sourced on a different channel of the same timer.
|
||||
*/
|
||||
|
||||
ledr->ops->start(ledr, &info);
|
||||
|
||||
@ -185,7 +185,9 @@ int stm32_rgbled_setup(void)
|
||||
info.channels[i].channel = 0;
|
||||
}
|
||||
|
||||
/* If the green timer is not the same as the red timer, then set it up. */
|
||||
/* If the green timer is not the same as the red timer, then set it
|
||||
* up.
|
||||
*/
|
||||
|
||||
if (RGBLED_GPWMTIMER != RGBLED_RPWMTIMER)
|
||||
{
|
||||
@ -211,9 +213,12 @@ int stm32_rgbled_setup(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* If the blue timer is different than the red and the green, it must be setup seperately */
|
||||
/* If the blue timer is different than the red and the green, it must
|
||||
* be setup separately.
|
||||
*/
|
||||
|
||||
if (RGBLED_BPWMTIMER != RGBLED_RPWMTIMER && RGBLED_BPWMTIMER != RGBLED_GPWMTIMER)
|
||||
if (RGBLED_BPWMTIMER != RGBLED_RPWMTIMER &&
|
||||
RGBLED_BPWMTIMER != RGBLED_GPWMTIMER)
|
||||
{
|
||||
info.channels[0].channel = RGBLED_BPWMCHANNEL;
|
||||
ledb->ops->start(ledb, &info);
|
||||
@ -228,7 +233,9 @@ int stm32_rgbled_setup(void)
|
||||
/* Register the RGB LED diver at "/dev/rgbled0" */
|
||||
|
||||
#ifdef CONFIG_PWM_MULTICHAN
|
||||
ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb, RGBLED_RPWMCHANNEL, RGBLED_GPWMCHANNEL, RGBLED_BPWMCHANNEL);
|
||||
ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb,
|
||||
RGBLED_RPWMCHANNEL, RGBLED_GPWMCHANNEL,
|
||||
RGBLED_BPWMCHANNEL);
|
||||
#else
|
||||
ret = rgbled_register("/dev/rgbled0", ledr, ledg, ledb);
|
||||
#endif
|
||||
|
@ -237,7 +237,8 @@ static int ina3221_readpower(FAR struct ina3221_dev_s *priv,
|
||||
{
|
||||
/* Read the raw bus voltage */
|
||||
|
||||
ret = ina3221_read16(priv, (INA3221_REG_CH1_BUS_VOLTAGE << i), ®);
|
||||
ret = ina3221_read16(priv, (INA3221_REG_CH1_BUS_VOLTAGE << i),
|
||||
®);
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: ina3221_read16 failed: %d\n", ret);
|
||||
@ -251,7 +252,8 @@ static int ina3221_readpower(FAR struct ina3221_dev_s *priv,
|
||||
|
||||
/* Read the raw shunt voltage */
|
||||
|
||||
ret = ina3221_read16(priv, (INA3221_REG_CH1_SHUNT_VOLTAGE << i), ®);
|
||||
ret = ina3221_read16(priv, (INA3221_REG_CH1_SHUNT_VOLTAGE << i),
|
||||
®);
|
||||
if (ret < 0)
|
||||
{
|
||||
snerr("ERROR: ina3221_read16 failed: %d\n", ret);
|
||||
@ -296,6 +298,7 @@ static int ina3221_open(FAR struct file *filep)
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ina3221_dev_s *priv = inode->i_private;
|
||||
|
||||
UNUSED(priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
@ -312,6 +315,7 @@ static int ina3221_close(FAR struct file *filep)
|
||||
FAR struct inode *inode = filep->f_inode;
|
||||
FAR struct ina3221_dev_s *priv = inode->i_private;
|
||||
|
||||
UNUSED(priv);
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user