DevAcademy - nRF Connect SDK Intermediate - Lesson 7 Exercise 3 - Build errors

Hi,

I'm in the proces of creating a custom driver for a sensor with a custom API, using nRF Connect SDK Intermediate's Lesson 7 Exercise 3 as a reference.

When building the project for the nRF9151dk_ns board target and SDK Toolchain v2.9.1 I get the following warning and errors:


------------------------------------------------------------------------------------------------------------------------------------------------------------------------

C:/myfw/ncsinter/l7_e3_sol/custom_driver_module/include/blink.h: In function 'z_impl_blink_set_period_ms':
C:/myfw/ncsinter/l7_e3_sol/custom_driver_module/include/blink.h:39:16: warning: implicit declaration of function 'DEVICE_API_GET'; did you mean 'DEVICE_NAME_GET'? [-Wimplicit-function-declaration]
39 | return DEVICE_API_GET(blink, dev)->set_period_ms(dev, period_ms);
| ^~~~~~~~~~~~~~
| DEVICE_NAME_GET
C:/myfw/ncsinter/l7_e3_sol/custom_driver_module/include/blink.h:39:31: error: 'blink' undeclared (first use in this function)
39 | return DEVICE_API_GET(blink, dev)->set_period_ms(dev, period_ms);
| ^~~~~
C:/myfw/ncsinter/l7_e3_sol/custom_driver_module/include/blink.h:39:31: note: each undeclared identifier is reported only once for each function it appears in
C:/myfw/ncsinter/l7_e3_sol/custom_driver_module/include/blink.h:40:1: warning: control reaches end of non-void function [-Wreturn-type]
40 | }
| ^

------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Thanks for your support.

Best regards,

Lalo

Parents Reply Children
Related