Browse Source

drivers: pwm: Place device APIs in linker sections

Use DEVICE_API macro to place driver API instances into a linker section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
pull/92320/head
Pieter De Gendt 2 weeks ago committed by Daniel DeGrasse
parent
commit
d4139d3d8d
  1. 2
      drivers/pwm/pwm_wch_gptm.c

2
drivers/pwm/pwm_wch_gptm.c

@ -131,7 +131,7 @@ static int pwm_wch_gptm_get_cycles_per_sec(const struct device *dev, uint32_t ch
return 0; return 0;
} }
static const struct pwm_driver_api pwm_wch_gptm_driver_api = { static DEVICE_API(pwm, pwm_wch_gptm_driver_api) = {
.set_cycles = pwm_wch_gptm_set_cycles, .set_cycles = pwm_wch_gptm_set_cycles,
.get_cycles_per_sec = pwm_wch_gptm_get_cycles_per_sec, .get_cycles_per_sec = pwm_wch_gptm_get_cycles_per_sec,
}; };

Loading…
Cancel
Save