ISKBoard example project
guowenxue
7 days ago 49447b2738a874071a2a4bb61b3e0c2af6be989f
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,31 @@
/* 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);
/*
 *+----------------------------+
 *|  Timer Buzzer/delay API    |
 *+----------------------------+
 */
/* Max to 60000 us */
extern void udelay(uint16_t us);
/* Turn buzzer on for $times */
extern void beep_start(uint16_t times, uint16_t interval);
#endif /* __MISCDEV_H */