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