23 lines
627 B
C
23 lines
627 B
C
#ifndef __BSP_MODULE_IO_H
|
|
#define __BSP_MODULE_IO_H
|
|
|
|
#include "ch32v10x.h"
|
|
|
|
typedef enum {
|
|
bsp_module_mijia_relay1 = 1 << 0,
|
|
bsp_module_mijia_relay2 = 1 << 1,
|
|
bsp_module_mijia_relay3 = 1 << 2,
|
|
bsp_module_mijia_relay4 = 1 << 3,
|
|
bsp_module_mijia_backlight = 1 << 4,
|
|
bsp_module_haier_relay1 = 1 << 5,
|
|
} bsp_module_relay_t;
|
|
|
|
#define BSP_MODULE_RELAY_NUMBER 6
|
|
|
|
void bsp_module_io_init(void);
|
|
bsp_module_relay_t bsp_module_relay_read(void);
|
|
void bsp_module_key_write(bsp_module_relay_t key, uint8_t pressed);
|
|
const char *bsp_relay_index_to_string(bsp_module_relay_t relay_stat);
|
|
|
|
#endif
|