casaroli commented on code in PR #21382:
URL: https://github.com/apache/nuttx/pull/21382#discussion_r4453532255
##########
boards/arm/nrf52/thingy52/src/nrf52_boot.c:
##########
@@ -51,11 +51,21 @@
void nrf52_board_initialize(void)
{
+ /* Enable the VDD rail that supplies the on-board sensors */
+
+ nrf52_gpio_config(GPIO_VDD_PWR_CTRL);
+
/* Configure on-board LEDs if LED support has been selected. */
#ifdef CONFIG_ARCH_LEDS
board_autoled_initialize();
#endif
+
+#ifdef CONFIG_NRF52_SPI_MASTER
+ /* Configure SPI chip selects */
+
+ nrf52_spidev_initialize();
Review Comment:
`nrf52_spidev_initialize()` does not exist for thingy52: no nrf52_spi.c in
thingy52/src and no prototype in thingy52.h, so a build with
CONFIG_NRF52_SPI_MASTER fails to link.
Fix: remove the `CONFIG_NRF52_SPI_MASTER` block, or add the SPI board file
with the function.
##########
boards/arm/nrf52/thingy52/src/Make.defs:
##########
@@ -30,6 +34,14 @@ ifeq ($(CONFIG_IOEXPANDER_SX1509),y)
CSRCS += nrf52_sx1509.c
endif
+ifeq ($(CONFIG_ADC),y)
+CSRCS += nrf52_adc.c
+endif
+
+ifeq ($(CONFIG_RGBLED),y)
Review Comment:
nrf52_rgbled.c is built for CONFIG_RGBLED alone, but it calls
`nrf52_sx1509_get()` and `IOEXP_SETPWM()`. With RGBLED and without
IOEXPANDER_SX1509/IOEXPANDER_PWM, the build fails with "implicit declaration of
function 'nrf52_sx1509_get'" and "'IOEXP_SETPWM'".
Fix: build nrf52_rgbled.c (Make.defs and CMakeLists.txt) and call
nrf52_rgbled_initialize() only when CONFIG_RGBLED, CONFIG_IOEXPANDER_SX1509 and
CONFIG_IOEXPANDER_PWM are all set.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]