mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-05 22:24:47 +08:00
gpio_led:Define GPIO_MAX_SERVO_PIN down to 4
Support boards with less than 6 (GPIO_SERVO_n) where n is now 16..4
This commit is contained in:
committed by
Daniel Agar
parent
f4992e64f7
commit
526f07b527
@@ -58,14 +58,14 @@
|
||||
#include <drivers/drv_gpio.h>
|
||||
#include <modules/px4iofirmware/protocol.h>
|
||||
|
||||
#define PIN_NAME "AUX OUT 1"
|
||||
|
||||
#define CYCLE_RATE_HZ 5
|
||||
|
||||
#define PIN_NAME "AUX OUT 1"
|
||||
|
||||
/* Minimum pin number */
|
||||
#define GPIO_MIN_SERVO_PIN 1
|
||||
|
||||
#define CYCLE_RATE_HZ 5
|
||||
|
||||
/* Maximum */
|
||||
#if defined(GPIO_SERVO_16)
|
||||
# define GPIO_MAX_SERVO_PIN 16
|
||||
@@ -89,8 +89,12 @@
|
||||
# define GPIO_MAX_SERVO_PIN 7
|
||||
#elif defined(GPIO_SERVO_6)
|
||||
# define GPIO_MAX_SERVO_PIN 6
|
||||
#elif defined(GPIO_SERVO_5)
|
||||
# define GPIO_MAX_SERVO_PIN 5
|
||||
#elif defined(GPIO_SERVO_4)
|
||||
# define GPIO_MAX_SERVO_PIN 4
|
||||
#else
|
||||
# error "Board must define GPIO_SERVO_1 and GPIO_SERVO_n where n is 6-16"
|
||||
# error "Board must define GPIO_SERVO_1 and GPIO_SERVO_n where n is 4-16"
|
||||
#endif
|
||||
|
||||
struct gpio_led_s {
|
||||
|
||||
Reference in New Issue
Block a user