feat: 添加 IO 外设控制组件,支持水泵与光照控制
This commit is contained in:
20
components/io_device_control/include/io_device_control.h
Normal file
20
components/io_device_control/include/io_device_control.h
Normal file
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "esp_err.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Initializes GPIO0/GPIO1 outputs and sets both devices off by default.
|
||||
esp_err_t io_device_control_init(void);
|
||||
|
||||
// High level control APIs, both are active-high outputs.
|
||||
esp_err_t io_device_control_set_pump(bool on);
|
||||
esp_err_t io_device_control_set_light(bool on);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user