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:
parent
c257c458ad
commit
d838ea596f
@ -82,7 +82,7 @@
|
|||||||
int board_apa102_initialize(int devno, int spino)
|
int board_apa102_initialize(int devno, int spino)
|
||||||
{
|
{
|
||||||
FAR struct spi_dev_s *spi;
|
FAR struct spi_dev_s *spi;
|
||||||
char devpath[12];
|
char devpath[13];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
spi = stm32_spibus_initialize(spino);
|
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. */
|
/* 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);
|
ret = apa102_register(devpath, spi);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
int board_veml6070_initialize(int devno, int busno)
|
int board_veml6070_initialize(int devno, int busno)
|
||||||
{
|
{
|
||||||
FAR struct i2c_master_s *i2c;
|
FAR struct i2c_master_s *i2c;
|
||||||
char devpath[13];
|
char devpath[14];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
sninfo("Initializing VEML6070!\n");
|
sninfo("Initializing VEML6070!\n");
|
||||||
@ -99,7 +99,7 @@ int board_veml6070_initialize(int devno, int busno)
|
|||||||
|
|
||||||
/* Then register the light sensor */
|
/* 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);
|
ret = veml6070_register(devpath, i2c, VEML6070_I2C_DATA_LSB_CMD_ADDR);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* drivers/sensors/apa102.c
|
* drivers/leds/apa102.c
|
||||||
* Character driver to control LED strips with APA102.
|
* Character driver to control LED strips with APA102.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user