12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef D_INOUTS_H
- #include "board.h"
- #include "common_config.h"
- #include <stdbool.h>
- #include <stdint.h>
- #include <stdlib.h>
- #define INOUTS_EXPAND_AS_ENUM(name, ...) name ## _,
- #ifdef DINS_ENABLE
- enum inputs_e {
- DI_TABLE(INOUTS_EXPAND_AS_ENUM)
- INPUTS_TOTAL_COUNT
- };
- extern uint8_t inputs[INPUTS_TOTAL_COUNT];
- bool get_inputs(uint8_t *inputs_p);
- uint8_t get_state_din_outs(gpio_t pin);
- #endif
- #ifdef DOUTS_ENABLE
- enum outputs_e {
- RELAYS(INOUTS_EXPAND_AS_ENUM)
- OUTPUTS_TOTAL_COUNT
- };
- extern uint8_t outputs[OUTPUTS_TOTAL_COUNT];
- bool set_outputs(uint8_t *outputs_p);
- void set_state_douts(gpio_t pin, uint8_t value);
- #endif
- #ifdef DINS_ENABLE || DOUTS_ENABLE
- void d_inouts_task(void *arg);
- #endif
- #if defined HARDWARE_BT6703
- void check_outputs_config(void);
- #endif
- #endif /* D_INOUTS_H */
|