25 lines
404 B
C
Raw Permalink Normal View History

2021-10-14 00:48:38 +08:00
/**
* @file bh1750.h
* @author Myth
* @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"
// 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);
void BH1750_Start(void);
2021-10-14 00:48:38 +08:00
float BH1750_Read(void);
float BH1750_StartAndRead(void);
2021-10-14 00:48:38 +08:00
#endif