|
16 | 16 | static const struct gpio_dt_spec ledGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(led0), gpios); |
17 | 17 | static const struct gpio_dt_spec burnwire0Gpio = GPIO_DT_SPEC_GET(DT_NODELABEL(burnwire0), gpios); |
18 | 18 | static const struct gpio_dt_spec burnwire1Gpio = GPIO_DT_SPEC_GET(DT_NODELABEL(burnwire1), gpios); |
19 | | -static const struct device* mcp23017_dev = DEVICE_DT_GET(DT_NODELABEL(mcp23017)); |
| 19 | +static const struct gpio_dt_spec face0LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face0_enable), gpios); |
| 20 | +static const struct gpio_dt_spec face1LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face1_enable), gpios); |
| 21 | +static const struct gpio_dt_spec face2LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face2_enable), gpios); |
| 22 | +static const struct gpio_dt_spec face3LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face3_enable), gpios); |
| 23 | +static const struct gpio_dt_spec face4LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face4_enable), gpios); |
| 24 | +static const struct gpio_dt_spec face5LoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(face5_enable), gpios); |
| 25 | +static const struct gpio_dt_spec payloadPowerLoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(payload_pwr_enable), gpios); |
| 26 | +static const struct gpio_dt_spec payloadBatteryLoadSwitchGpio = GPIO_DT_SPEC_GET(DT_NODELABEL(payload_batt_enable), gpios); |
20 | 27 |
|
21 | 28 | // Allows easy reference to objects in FPP/autocoder required namespaces |
22 | 29 | using namespace ReferenceDeployment; |
@@ -61,16 +68,14 @@ void configureTopology() { |
61 | 68 | gpioWatchdog.open(ledGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
62 | 69 | gpioBurnwire0.open(burnwire0Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
63 | 70 | gpioBurnwire1.open(burnwire1Gpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
64 | | - /* |
65 | | - face4LoadSwitch.pin_configuration(mcp23017_dev, 0); // Pin 0 on MCP23017 |
66 | | - face0LoadSwitch.pin_configuration(mcp23017_dev, 1); // Pin 1 on MCP23017 |
67 | | - face1LoadSwitch.pin_configuration(mcp23017_dev, 2); // Pin 2 on MCP23017 |
68 | | - face2LoadSwitch.pin_configuration(mcp23017_dev, 3); // Pin 3 on MCP23017 |
69 | | - face3LoadSwitch.pin_configuration(mcp23017_dev, 4); // Pin 4 on MCP23017 |
70 | | - face5LoadSwitch.pin_configuration(mcp23017_dev, 5); // Pin 5 on MCP23017 |
71 | | - payloadPowerLoadSwitch.pin_configuration(mcp23017_dev, 7); // Pin 7 on MCP23017 |
72 | | - payloadBatteryLoadSwitch.pin_configuration(mcp23017_dev, 9); // Pin 9 on MCP23017 |
73 | | - */ |
| 71 | + gpioface4LS.open(face4LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 72 | + gpioface0LS.open(face0LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 73 | + gpioface1LS.open(face1LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 74 | + gpioface2LS.open(face2LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 75 | + gpioface3LS.open(face3LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 76 | + gpioface5LS.open(face5LoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 77 | + gpioPayloadPowerLS.open(payloadPowerLoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
| 78 | + gpioPayloadBatteryLS.open(payloadBatteryLoadSwitchGpio, Zephyr::ZephyrGpioDriver::GpioConfiguration::OUT); |
74 | 79 | } |
75 | 80 |
|
76 | 81 | // Public functions for use in main program are namespaced with deployment name ReferenceDeployment |
|
0 commit comments