boards/arm/stm32/common: devpath not long enough for apa102 and veml6070

Also header path updated in drivers/leds/apa102.c
This commit is contained in:
Diego Herranz 2020-12-08 20:54:36 +00:00 committed by Abdelatif Guettouche
parent c257c458ad
commit d838ea596f
3 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@
int board_apa102_initialize(int devno, int spino)
{
FAR struct spi_dev_s *spi;
char devpath[12];
char devpath[13];
int ret;
spi = stm32_spibus_initialize(spino);
@ -93,7 +93,7 @@ int board_apa102_initialize(int devno, int spino)
/* Register the APA102 Driver at the specified location. */
snprintf(devpath, 12, "/dev/leddrv%d", devno);
snprintf(devpath, 13, "/dev/leddrv%d", devno);
ret = apa102_register(devpath, spi);
if (ret < 0)
{

View File

@ -83,7 +83,7 @@
int board_veml6070_initialize(int devno, int busno)
{
FAR struct i2c_master_s *i2c;
char devpath[13];
char devpath[14];
int ret;
sninfo("Initializing VEML6070!\n");
@ -99,7 +99,7 @@ int board_veml6070_initialize(int devno, int busno)
/* Then register the light sensor */
snprintf(devpath, 13, "/dev/uvlight%d", devno);
snprintf(devpath, 14, "/dev/uvlight%d", devno);
ret = veml6070_register(devpath, i2c, VEML6070_I2C_DATA_LSB_CMD_ADDR);
if (ret < 0)
{

View File

@ -1,5 +1,5 @@
/****************************************************************************
* drivers/sensors/apa102.c
* drivers/leds/apa102.c
* Character driver to control LED strips with APA102.
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.