From 9d92def44dc84a0fd125850c81ec99aecee2b899 Mon Sep 17 00:00:00 2001 From: guowenxue <guowenxue@gmail.com> Date: Tue, 07 Oct 2025 01:25:58 +0800 Subject: [PATCH] 楼道声光控灯项目程序 --- Core/Src/board/miscdev.h | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/Core/Src/board/miscdev.h b/Core/Src/board/miscdev.h index d0887d2..676d6a0 100644 --- a/Core/Src/board/miscdev.h +++ b/Core/Src/board/miscdev.h @@ -13,6 +13,8 @@ #ifndef __MISCDEV_H #define __MISCDEV_H +#include <stdio.h> + /* 定义ON/OFF两个宏,这样在代码中使用比 1/0 更具有可读性 */ #define OFF 0 #define ON 1 @@ -82,4 +84,19 @@ /* Get $which led current status */ extern int status_led(int which); +/* + *+----------------------------+ + *| ADC noisy & lux sensor API | + *+----------------------------+ + */ + +enum +{ + ADCCHN_NOISY, + ADCCHN_LUX, + ADCCHN_MAX, +}; + +extern int adc_sample_lux_noisy(uint32_t *lux, uint32_t *noisy); + #endif /* __MISCDEV_H */ -- Gitblit v1.9.1