mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 13:14:06 +08:00
re-activated gpio_mcp23009 driver, removed useless comments and empty lines
This commit is contained in:
parent
8b3f682515
commit
3f3b2d6aaa
@ -18,6 +18,7 @@ CONFIG_DRIVERS_DIFFERENTIAL_PRESSURE_AUAV=y
|
||||
CONFIG_COMMON_DISTANCE_SENSOR=y
|
||||
CONFIG_DRIVERS_DSHOT=y
|
||||
CONFIG_DRIVERS_GNSS_SEPTENTRIO=y
|
||||
CONFIG_DRIVERS_GPIO_MCP23009=y
|
||||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IMU_BOSCH_BMI088=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
|
||||
|
||||
@ -22,7 +22,7 @@ netman update_default -i eth0
|
||||
|
||||
safety_button start
|
||||
|
||||
GPIO Expander driver on external I2C3
|
||||
# GPIO Expander driver on external I2C3
|
||||
if ver hwbasecmp 009 010 011
|
||||
then
|
||||
# No USB
|
||||
@ -32,5 +32,3 @@ if ver hwbasecmp 00a 008
|
||||
then
|
||||
mcp23009 start -b 3 -X -D 0xf1 -O 0xf0 -P 0x0f -U 10
|
||||
fi
|
||||
|
||||
#mcp23017 start -b 2 -X -D 0x0000 -O 0x0000 -P 0x0000 -U 10 -R 0x0000
|
||||
|
||||
@ -274,6 +274,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
usleep(500 * 1000);
|
||||
|
||||
# ifdef CONFIG_MMCSD
|
||||
|
||||
int ret = stm32_sdio_initialize();
|
||||
|
||||
if (ret != OK) {
|
||||
@ -282,6 +283,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
}
|
||||
|
||||
# endif /* CONFIG_MMCSD */
|
||||
|
||||
ret = mcp23009_register_gpios(3, 0x25);
|
||||
|
||||
if (ret != OK) {
|
||||
@ -289,19 +291,7 @@ __EXPORT int board_app_initialize(uintptr_t arg)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*int offset = 8; // This is the offset for the naming of the instatiated GPIO-DEVICES.
|
||||
uint16_t pin_types = 0x0000;// Set pin type. Set bit to 1 to mark pin as INPUT, set to 0 to mark as OUTPUT
|
||||
|
||||
ret = mcp23017_register_gpios(2, 0x27, offset, pin_types);
|
||||
|
||||
if (ret != OK) {
|
||||
led_on(LED_RED);
|
||||
return ret;
|
||||
}*/
|
||||
|
||||
#endif /* !defined(BOOTLOADER) */
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -116,8 +116,6 @@ static int mcp23017_setpintype(struct gpio_dev_s *dev, enum gpio_pintype_e pinty
|
||||
return toGpioConfig.publish(msg) ? OK : -ETIMEDOUT;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
static const struct gpio_operations_s mcp23017_gpio_ops {
|
||||
mcp23017_read,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user