mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 04:43:36 +08:00
delete unused GPIO_SET_INPUT
This commit is contained in:
@@ -68,9 +68,6 @@
|
|||||||
/** configure the board GPIOs in (arg) as outputs */
|
/** configure the board GPIOs in (arg) as outputs */
|
||||||
#define GPIO_SET_OUTPUT GPIOC(1)
|
#define GPIO_SET_OUTPUT GPIOC(1)
|
||||||
|
|
||||||
/** configure the board GPIOs in (arg) as inputs */
|
|
||||||
#define GPIO_SET_INPUT GPIOC(2)
|
|
||||||
|
|
||||||
/** set the GPIOs in (arg) */
|
/** set the GPIOs in (arg) */
|
||||||
#define GPIO_SET GPIOC(10)
|
#define GPIO_SET GPIOC(10)
|
||||||
|
|
||||||
|
|||||||
@@ -2671,13 +2671,6 @@ PX4FMU::gpio_set_function(uint32_t gpios, int function)
|
|||||||
for (unsigned i = 0; i < _ngpio; i++) {
|
for (unsigned i = 0; i < _ngpio; i++) {
|
||||||
if (gpios & (1 << i)) {
|
if (gpios & (1 << i)) {
|
||||||
switch (function) {
|
switch (function) {
|
||||||
case GPIO_SET_INPUT:
|
|
||||||
if (_gpio_tab[i].input) {
|
|
||||||
px4_arch_configgpio(_gpio_tab[i].input);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GPIO_SET_OUTPUT:
|
case GPIO_SET_OUTPUT:
|
||||||
if (_gpio_tab[i].output) {
|
if (_gpio_tab[i].output) {
|
||||||
px4_arch_configgpio(_gpio_tab[i].output);
|
px4_arch_configgpio(_gpio_tab[i].output);
|
||||||
@@ -2881,7 +2874,6 @@ PX4FMU::gpio_ioctl(struct file *filp, int cmd, unsigned long arg)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GPIO_SET_OUTPUT:
|
case GPIO_SET_OUTPUT:
|
||||||
case GPIO_SET_INPUT:
|
|
||||||
ret = gpio_set_function(arg, cmd);
|
ret = gpio_set_function(arg, cmd);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user