2021-10-14 00:48:38 +08:00
|
|
|
/**
|
|
|
|
|
* @file bh1750.h
|
|
|
|
|
* @author Myth
|
2021-10-15 00:21:49 +08:00
|
|
|
* @version 0.2
|
|
|
|
|
* @date 2021.10.15
|
2021-10-14 00:48:38 +08:00
|
|
|
* @brief BH1750 驱动
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef __BH1750_H
|
|
|
|
|
#define __BH1750_H
|
|
|
|
|
|
|
|
|
|
#include "sys.h"
|
|
|
|
|
|
2021-10-15 00:21:49 +08:00
|
|
|
// BH1750 引脚设置
|
2021-10-14 00:48:38 +08:00
|
|
|
#define BH1750_GPIO GPIOB
|
|
|
|
|
#define BH1750_SDA_PIN GPIO_PIN_10
|
|
|
|
|
#define BH1750_SCL_PIN GPIO_PIN_11
|
|
|
|
|
|
|
|
|
|
void BH1750_Init(void);
|
2021-10-15 00:21:49 +08:00
|
|
|
void BH1750_Start(void);
|
2021-10-14 00:48:38 +08:00
|
|
|
float BH1750_Read(void);
|
2021-10-15 00:21:49 +08:00
|
|
|
float BH1750_StartAndRead(void);
|
2021-10-14 00:48:38 +08:00
|
|
|
|
|
|
|
|
#endif
|