Hi,
Thanks for the response!!
Hi,
Are you looking to use an existing zephyr driver, or create a new one? Either way, the structure will be populated by the DEVICE_DEFINE()/DEVICE_DT_DEFINE() macro in the driver implementation, and the pointer to this structure is then retrieved by the main application through DEVICE_GET()/DEVICE_DT_GET() or device_get_binding(<device name>).
As an example, you may take a look at the Zephyr fade_led sample (/zephyr/samples/fade_led) to see how it invokes the nrf52's PWM driver:
Getting the device object from the main application

"PWM_0" label in <build dir>/zephyr/zephyr.dts

Device object definition in /zephyr/drivers/pwm/pwm_nrfx.c

Hi,
Are you looking to use an existing zephyr driver, or create a new one? Either way, the structure will be populated by the DEVICE_DEFINE()/DEVICE_DT_DEFINE() macro in the driver implementation, and the pointer to this structure is then retrieved by the main application through DEVICE_GET()/DEVICE_DT_GET() or device_get_binding(<device name>).
As an example, you may take a look at the Zephyr fade_led sample (/zephyr/samples/fade_led) to see how it invokes the nrf52's PWM driver:
Getting the device object from the main application

"PWM_0" label in <build dir>/zephyr/zephyr.dts

Device object definition in /zephyr/drivers/pwm/pwm_nrfx.c
