mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
6dc2a60597
The previous servo driver didn't provide any benefit over using PWM directly, as users controlled the servo in terms of PWM duty cycles. This changes the interface to provide a high level interface that abstracts the gory PWM details. In addition, a SAUL layer and auto-initialization is provided. Co-authored-by: benpicco <benpicco@googlemail.com>
23 lines
579 B
Makefile
23 lines
579 B
Makefile
ifneq (,$(filter saul,$(USEMODULE)))
|
|
DEFAULT_MODULE += servo_saul
|
|
endif
|
|
|
|
# if no servo driver implementation is chosen, we pick one
|
|
ifeq (,$(filter servo_pwm servo_timer,$(USEMODULE)))
|
|
# choose servo_pwm except for MCUs known to be incompatible
|
|
ifneq (,$(filter nrf5%, $(CPU_FAM)))
|
|
USEMODULE += servo_timer
|
|
else
|
|
USEMODULE += servo_pwm
|
|
endif
|
|
endif
|
|
|
|
ifneq (,$(filter servo_pwm,$(USEMODULE)))
|
|
FEATURES_REQUIRED += periph_pwm
|
|
endif
|
|
|
|
ifneq (,$(filter servo_timer,$(USEMODULE)))
|
|
FEATURES_REQUIRED += periph_timer_periodic
|
|
FEATURES_REQUIRED += periph_gpio
|
|
endif
|