samples drivers led: Fix main return
Since 3a197934fc
main() should be int main(void) instead of void main(void)
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
parent
5d1eae6399
commit
b40c052289
|
@ -110,28 +110,28 @@ static int led_on_off(const struct device *led)
|
|||
|
||||
const struct device *led_dev = DEVICE_DT_GET_ONE(issi_is31fl3733);
|
||||
|
||||
void main(void)
|
||||
int main(void)
|
||||
{
|
||||
int ret;
|
||||
int current_limit = 0xFF;
|
||||
|
||||
if (!device_is_ready(led_dev)) {
|
||||
printk("Error- LED device is not ready\n");
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (1) {
|
||||
ret = led_channel_write(led_dev);
|
||||
if (ret < 0) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
ret = led_brightness(led_dev);
|
||||
if (ret < 0) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
ret = led_on_off(led_dev);
|
||||
if (ret < 0) {
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
if (current_limit == 0xFF) {
|
||||
/* Select lower current limt */
|
||||
|
@ -140,7 +140,7 @@ void main(void)
|
|||
ret = is31fl3733_current_limit(led_dev, current_limit);
|
||||
if (ret) {
|
||||
printk("Could not set LED current limit (%d)\n", ret);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
} else {
|
||||
/* Select higher current limt */
|
||||
|
@ -149,7 +149,7 @@ void main(void)
|
|||
ret = is31fl3733_current_limit(led_dev, current_limit);
|
||||
if (ret) {
|
||||
printk("Could not set LED current limit (%d)\n", ret);
|
||||
return;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -330,7 +330,7 @@ static int run_test(const struct device *const lp50xx_dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void main(void)
|
||||
int main(void)
|
||||
{
|
||||
const struct device *lp50xx_dev;
|
||||
bool found = false;
|
||||
|
@ -434,4 +434,5 @@ void main(void)
|
|||
if (!found) {
|
||||
LOG_ERR("No LP50XX LED controller found");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue