|
4 | 4 | #include "common/core/freertos_timer.hpp"
|
5 | 5 | #include "hepa-uv/core/can_task.hpp"
|
6 | 6 | #include "hepa-uv/firmware/gpio_drive_hardware.hpp"
|
| 7 | +#include "hepa-uv/firmware/utility_gpio.h" |
7 | 8 |
|
8 | 9 | #pragma GCC diagnostic push
|
9 | 10 | // NOLINTNEXTLINE(clang-diagnostic-unknown-warning-option)
|
10 | 11 | #pragma GCC diagnostic ignored "-Wvolatile"
|
11 |
| -#include "hepa-uv/firmware/utility_gpio.h" |
| 12 | +#include "platform_specific_hal_conf.h" |
12 | 13 | #pragma GCC diagnostic pop
|
13 | 14 |
|
14 | 15 | static auto tasks = hepauv_tasks::AllTask{};
|
15 | 16 | static auto queues = hepauv_tasks::QueueClient{can::ids::NodeId::hepa_uv};
|
16 | 17 |
|
17 | 18 | static auto gpio_drive_pins = gpio_drive_hardware::GpioDrivePins{
|
18 |
| - .door_open = gpio::PinConfig{.port = DOOR_OPEN_MCU_PORT, |
19 |
| - .pin = DOOR_OPEN_MCU_PIN, |
20 |
| - .active_setting = DOOR_OPEN_MCU_AS}, |
21 |
| - .reed_switch = gpio::PinConfig{.port = REED_SW_MCU_PORT, |
22 |
| - .pin = REED_SW_MCU_PIN, |
23 |
| - .active_setting = REED_SW_MCU_AS}, |
| 19 | + .door_open = |
| 20 | + gpio::PinConfig{ |
| 21 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
| 22 | + .port = DOOR_OPEN_MCU_PORT, |
| 23 | + .pin = DOOR_OPEN_MCU_PIN, |
| 24 | + .active_setting = DOOR_OPEN_MCU_AS}, |
| 25 | + .reed_switch = |
| 26 | + gpio::PinConfig{ |
| 27 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
| 28 | + .port = REED_SW_MCU_PORT, |
| 29 | + .pin = REED_SW_MCU_PIN, |
| 30 | + .active_setting = REED_SW_MCU_AS}, |
24 | 31 | .hepa_push_button =
|
25 | 32 | gpio::PinConfig{
|
| 33 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
26 | 34 | .port = HEPA_NO_MCU_PORT,
|
27 | 35 | .pin = HEPA_NO_MCU_PIN,
|
28 | 36 | },
|
29 | 37 | .uv_push_button =
|
30 | 38 | gpio::PinConfig{
|
| 39 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
31 | 40 | .port = UV_NO_MCU_PORT,
|
32 | 41 | .pin = UV_NO_MCU_PIN,
|
33 | 42 | },
|
34 |
| - .hepa_on_off = gpio::PinConfig{.port = HEPA_ON_OFF_PORT, |
35 |
| - .pin = HEPA_ON_OFF_PIN, |
36 |
| - .active_setting = HEPA_ON_OFF_AS}, |
37 |
| - .uv_on_off = gpio::PinConfig{.port = UV_ON_OFF_MCU_PORT, |
38 |
| - .pin = UV_ON_OFF_MCU_PIN, |
39 |
| - .active_setting = UV_ON_OFF_AS}}; |
| 43 | + .hepa_on_off = |
| 44 | + gpio::PinConfig{ |
| 45 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
| 46 | + .port = HEPA_ON_OFF_PORT, |
| 47 | + .pin = HEPA_ON_OFF_PIN, |
| 48 | + .active_setting = HEPA_ON_OFF_AS}, |
| 49 | + .uv_on_off = gpio::PinConfig{ |
| 50 | + // NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast) |
| 51 | + .port = UV_ON_OFF_MCU_PORT, |
| 52 | + .pin = UV_ON_OFF_MCU_PIN, |
| 53 | + .active_setting = UV_ON_OFF_AS}}; |
40 | 54 |
|
41 | 55 | static auto hepa_task_builder =
|
42 | 56 | freertos_task::TaskStarter<512, hepa_task::HepaTask>{};
|
|
0 commit comments