增加温湿度传感器sht30

This commit is contained in:
Aladdin-Wang 2020-03-26 17:15:34 +08:00
parent 2676d93edd
commit d8e312ff0e
5 changed files with 272 additions and 208 deletions

View File

@ -434,7 +434,11 @@ CONFIG_PKG_AT_DEVICE_VER_NUM=0x99999
# CONFIG_PKG_USING_SENSORS_DRIVERS is not set # CONFIG_PKG_USING_SENSORS_DRIVERS is not set
# CONFIG_PKG_USING_REALTEK_AMEBA is not set # CONFIG_PKG_USING_REALTEK_AMEBA is not set
# CONFIG_PKG_USING_SHT2X is not set # CONFIG_PKG_USING_SHT2X is not set
# CONFIG_PKG_USING_SHT3X is not set CONFIG_PKG_USING_SHT3X=y
CONFIG_PKG_SHT3X_PATH="/packages/peripherals/sht3x"
# CONFIG_PKG_USING_SHT3X_V100 is not set
CONFIG_PKG_USING_SHT3X_LATEST_VERSION=y
CONFIG_PKG_SHT3X_VER="latest"
# CONFIG_PKG_USING_STM32_SDIO is not set # CONFIG_PKG_USING_STM32_SDIO is not set
# CONFIG_PKG_USING_ICM20608 is not set # CONFIG_PKG_USING_ICM20608 is not set
# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_U8G2 is not set
@ -535,7 +539,13 @@ CONFIG_BSP_USING_UART3=y
# CONFIG_BSP_USING_SPI is not set # CONFIG_BSP_USING_SPI is not set
# CONFIG_BSP_USING_QSPI is not set # CONFIG_BSP_USING_QSPI is not set
# CONFIG_BSP_USING_ADC is not set # CONFIG_BSP_USING_ADC is not set
# CONFIG_BSP_USING_I2C1 is not set CONFIG_BSP_USING_I2C1=y
#
# Notice: PB6 --> 22; PB7 --> 23
#
CONFIG_BSP_I2C1_SCL_PIN=53
CONFIG_BSP_I2C1_SDA_PIN=54
CONFIG_BSP_USING_ONCHIP_RTC=y CONFIG_BSP_USING_ONCHIP_RTC=y
CONFIG_BSP_RTC_USING_LSE=y CONFIG_BSP_RTC_USING_LSE=y
# CONFIG_BSP_RTC_USING_LSI is not set # CONFIG_BSP_RTC_USING_LSI is not set

View File

@ -14,9 +14,8 @@
#ifdef RT_USING_I2C #ifdef RT_USING_I2C
//#define DRV_DEBUG #define DRV_DEBUG
#define LOG_TAG "drv.i2c" #define LOG_TAG "drv.i2c"
#define DBG_LVL DBG_LOG
#include <drv_log.h> #include <drv_log.h>
#if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4) #if !defined(BSP_USING_I2C1) && !defined(BSP_USING_I2C2) && !defined(BSP_USING_I2C3) && !defined(BSP_USING_I2C4)

View File

@ -338,7 +338,7 @@
<MiscControls></MiscControls> <MiscControls></MiscControls>
<Define>STM32F767xx, USE_HAL_DRIVER, RT_USING_ARM_LIBC</Define> <Define>STM32F767xx, USE_HAL_DRIVER, RT_USING_ARM_LIBC</Define>
<Undefine></Undefine> <Undefine></Undefine>
<IncludePath>.;rt-thread\include;applications;.;board;board\CubeMX_Config\Inc;board\ports;libraries\HAL_Drivers;libraries\HAL_Drivers\config;board\CubeMX_Config\Src;board\CubeMX_Config\Middlewares\ST\touchgfx\framework\include;board\CubeMX_Config\Src\generated\fonts\include;board\CubeMX_Config\Src\generated\gui_generated\include;board\CubeMX_Config\Src\generated\images\include;board\CubeMX_Config\Src\generated\texts\include;board\CubeMX_Config\Src\gui\include;packages\at_device-latest\inc;packages\at_device-latest\class\esp8266;packages\netutils-latest\ntp;rt-thread\libcpu\arm\common;rt-thread\libcpu\arm\cortex-m7;rt-thread\components\cplusplus;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\spi;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\touch;rt-thread\components\drivers\include;rt-thread\components\finsh;rt-thread\components\libc\compilers\armlibc;rt-thread\components\libc\compilers\common;rt-thread\components\net\at\include;rt-thread\components\net\at\at_socket;rt-thread\components\net\netdev\include;rt-thread\components\net\sal_socket\include;rt-thread\components\net\sal_socket\include\socket;rt-thread\components\net\sal_socket\impl;rt-thread\components\net\sal_socket\include\socket\sys_socket;rt-thread\components\utilities\ulog;libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Inc;libraries\STM32F7xx_HAL\CMSIS\Device\ST\STM32F7xx\Include;libraries\STM32F7xx_HAL\CMSIS\Include</IncludePath> <IncludePath>.;rt-thread\include;applications;.;board;board\CubeMX_Config\Inc;board\ports;libraries\HAL_Drivers;libraries\HAL_Drivers\config;board\CubeMX_Config\Src;board\CubeMX_Config\Middlewares\ST\touchgfx\framework\include;board\CubeMX_Config\Src\generated\fonts\include;board\CubeMX_Config\Src\generated\gui_generated\include;board\CubeMX_Config\Src\generated\images\include;board\CubeMX_Config\Src\generated\texts\include;board\CubeMX_Config\Src\gui\include;packages\at_device-latest\inc;packages\at_device-latest\class\esp8266;packages\netutils-latest\ntp;packages\sht3x-latest;rt-thread\libcpu\arm\common;rt-thread\libcpu\arm\cortex-m7;rt-thread\components\cplusplus;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\spi;rt-thread\components\drivers\include;rt-thread\components\drivers\include;rt-thread\components\drivers\touch;rt-thread\components\drivers\include;rt-thread\components\finsh;rt-thread\components\libc\compilers\armlibc;rt-thread\components\libc\compilers\common;rt-thread\components\net\at\include;rt-thread\components\net\at\at_socket;rt-thread\components\net\netdev\include;rt-thread\components\net\sal_socket\include;rt-thread\components\net\sal_socket\include\socket;rt-thread\components\net\sal_socket\impl;rt-thread\components\net\sal_socket\include\socket\sys_socket;rt-thread\components\utilities\ulog;libraries\STM32F7xx_HAL\STM32F7xx_HAL_Driver\Inc;libraries\STM32F7xx_HAL\CMSIS\Device\ST\STM32F7xx\Include;libraries\STM32F7xx_HAL\CMSIS\Include</IncludePath>
</VariousControls> </VariousControls>
</Cads> </Cads>
<Aads> <Aads>
@ -512,6 +512,11 @@
<FileType>1</FileType> <FileType>1</FileType>
<FilePath>libraries\HAL_Drivers\drv_spi.c</FilePath> <FilePath>libraries\HAL_Drivers\drv_spi.c</FilePath>
</File> </File>
<File>
<FileName>drv_soft_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>libraries\HAL_Drivers\drv_soft_i2c.c</FilePath>
</File>
<File> <File>
<FileName>drv_sdram.c</FileName> <FileName>drv_sdram.c</FileName>
<FileType>1</FileType> <FileType>1</FileType>
@ -739,6 +744,16 @@
</File> </File>
</Files> </Files>
</Group> </Group>
<Group>
<GroupName>sht3x</GroupName>
<Files>
<File>
<FileName>sht3x.c</FileName>
<FileType>1</FileType>
<FilePath>packages\sht3x-latest\sht3x.c</FilePath>
</File>
</Files>
</Group>
<Group> <Group>
<GroupName>cpu</GroupName> <GroupName>cpu</GroupName>
<Files> <Files>

View File

@ -207,6 +207,8 @@
/* peripheral libraries and drivers */ /* peripheral libraries and drivers */
#define PKG_USING_SHT3X
#define PKG_USING_SHT3X_LATEST_VERSION
/* miscellaneous packages */ /* miscellaneous packages */
@ -233,6 +235,12 @@
#define BSP_USING_UART #define BSP_USING_UART
#define BSP_USING_UART1 #define BSP_USING_UART1
#define BSP_USING_UART3 #define BSP_USING_UART3
#define BSP_USING_I2C1
/* Notice: PB6 --> 22; PB7 --> 23 */
#define BSP_I2C1_SCL_PIN 53
#define BSP_I2C1_SDA_PIN 54
#define BSP_USING_ONCHIP_RTC #define BSP_USING_ONCHIP_RTC
#define BSP_RTC_USING_LSE #define BSP_RTC_USING_LSE
#define BSP_USING_FMC #define BSP_USING_FMC