From ae4b04bcb2e5a7dca2f2f5a2cd264b5a622346a2 Mon Sep 17 00:00:00 2001 From: mculover666 <2412828003@qq.com> Date: Fri, 27 Dec 2019 14:41:18 +0800 Subject: [PATCH] add HTS221 sensor driver --- .../BSP/HardWare/HTS221/HTS221.c | 147 ++++++++++++++++++ .../BSP/HardWare/HTS221/HTS221.h | 25 +++ board/NUCLEO_STM32L073RZ/BSP/Inc/i2c.h | 58 +++++++ board/NUCLEO_STM32L073RZ/BSP/Inc/mcu_init.h | 1 + board/NUCLEO_STM32L073RZ/BSP/Src/i2c.c | 118 ++++++++++++++ board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c | 1 + .../KEIL/lorawan/TencentOS_tiny.uvoptx | 130 +++++++++------- .../KEIL/lorawan/TencentOS_tiny.uvprojx | 12 +- 8 files changed, 438 insertions(+), 54 deletions(-) create mode 100644 board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.c create mode 100644 board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.h create mode 100644 board/NUCLEO_STM32L073RZ/BSP/Inc/i2c.h create mode 100644 board/NUCLEO_STM32L073RZ/BSP/Src/i2c.c diff --git a/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.c b/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.c new file mode 100644 index 00000000..58854aac --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.c @@ -0,0 +1,147 @@ +/******************************************* + * @breif HTS221驱动文件 + * @author Mculover666(www.mculover666.cn) + * @date 2019-12-27 + * @version 1.0.0 +********************************************/ + +#include +#include + +/* 设置工作模式,初始化HTS221 */ +void HTS221_Init() +{ + uint8_t cmd = 0; + + //设置分辨率 + cmd = 0x3F; + HAL_I2C_Mem_Write(&hi2c1, HTS221_ADDR_WR, 0x10, I2C_MEMADD_SIZE_8BIT, &cmd, 1, 0xFFFF); + + //设置电源、数据块更新模式、数据输出速率 + cmd = 0x84; + HAL_I2C_Mem_Write(&hi2c1, HTS221_ADDR_WR, HTS221_CTRL_REG1, I2C_MEMADD_SIZE_8BIT, &cmd, 1, 0xFFFF); + + //设置数据存储块复位模式,关闭内部加热 + cmd = 0x00; + HAL_I2C_Mem_Write(&hi2c1, HTS221_ADDR_WR, HTS221_CTRL_REG2, I2C_MEMADD_SIZE_8BIT, &cmd, 1, 0xFFFF); + + //关闭数据完成输出信号 + cmd = 0x00; + HAL_I2C_Mem_Write(&hi2c1, HTS221_ADDR_WR, HTS221_CTRL_REG3, I2C_MEMADD_SIZE_8BIT, &cmd, 1, 0xFFFF); + +} + +/* HTS221启动一次转换 */ +static void HTS221_Start() +{ + uint8_t dat = 0; + + //读取REG2寄存器中的值,防止设置信息被破坏 + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_CTRL_REG2, I2C_MEMADD_SIZE_8BIT, &dat, 1, 0xFFFF); + + //启动一次转换 + dat |= 0x01; + HAL_I2C_Mem_Write(&hi2c1, HTS221_ADDR_WR, HTS221_CTRL_REG2, I2C_MEMADD_SIZE_8BIT, &dat, 1, 0xFFFF); + +} + +/* 启动一次转换并获取校验后的温度值 */ +/* note:该API获取的值是10倍数据 */ +uint8_t HTS221_Get_Temperature(int16_t* temperature) +{ + uint8_t status_dat = 0; + int16_t T0_degC, T1_degC; + int16_t T0_out, T1_out, T_out, T0_degC_x8_u16, T1_degC_x8_u16; + uint8_t T0_degC_x8, T1_degC_x8, tmp; + uint8_t buffer[4]; + int32_t tmp32; + + /*1. 读取T0_degC_x8 和 T1_degC_x8 校验值 */ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x32, I2C_MEMADD_SIZE_8BIT, &T0_degC_x8, 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x33, I2C_MEMADD_SIZE_8BIT, &T1_degC_x8, 1, 0xFFFF); + + /*2. 读取T1_degC 和 T0_degC 的最高位*/ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x35, I2C_MEMADD_SIZE_8BIT, &tmp, 1, 0xFFFF); + + // 计算T0_degC and T1_degC 值 */ + T0_degC_x8_u16 = (((uint16_t)(tmp & 0x03)) << 8) | ((uint16_t)T0_degC_x8); + T1_degC_x8_u16 = (((uint16_t)(tmp & 0x0C)) << 6) | ((uint16_t)T1_degC_x8); + T0_degC = T0_degC_x8_u16>>3; + T1_degC = T1_degC_x8_u16>>3; + + /*3. 读取 T0_OUT 和 T1_OUT 值 */ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3C, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3D, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3E, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3F, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + + T0_out = (((uint16_t)buffer[1])<<8) | (uint16_t)buffer[0]; + T1_out = (((uint16_t)buffer[3])<<8) | (uint16_t)buffer[2]; + + /* 4. 启动转换,等待完成后读取转换后的值T_OUT */ + HTS221_Start(); + while(status_dat != 0x03) + { + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_STATUS_REG, I2C_MEMADD_SIZE_8BIT, &status_dat, 1, 0xFFFF); + } + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_TEMP_OUT_L, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_TEMP_OUT_H, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + + T_out = (((uint16_t)buffer[1])<<8) | (uint16_t)buffer[0]; + + /* 5. 使用线性插值法计算当前对应的温度值 */ + tmp32 = ((int32_t)(T_out - T0_out)) * ((int32_t)(T1_degC - T0_degC)*10); + *temperature = tmp32 /(T1_out - T0_out) + T0_degC*10; + + return 0; +} + +/* 启动一次转换并获取校验后的湿度值 */ +/* note:该API获取的值是10倍数据 */ +uint8_t HTS221_Get_Humidity(int16_t* humidity) +{ + uint8_t status_dat = 0; + int16_t H0_T0_out, H1_T0_out, H_T_out; + int16_t H0_rh, H1_rh; + uint8_t buffer[2]; + int32_t tmp; + + + /* 1. 读取H0_rH and H1_rH 校验值 */ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x30, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x31, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + H0_rh = buffer[0] >> 1; + H1_rh = buffer[1] >> 1; + + /*2. 读取 H0_T0_OUT 校验值 */ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x36, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x37, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + H0_T0_out = (((uint16_t)buffer[1])<<8) | (uint16_t)buffer[0]; + + /*3. 读取 H1_T0_OUT 校验值 */ + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3A, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, 0x3B, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + H1_T0_out = (((uint16_t)buffer[1])<<8) | (uint16_t)buffer[0]; + + /*4. 启动转换,等待完成后读取转换后的值 */ + HTS221_Start(); + while(status_dat != 0x03) + { + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_STATUS_REG, I2C_MEMADD_SIZE_8BIT, &status_dat, 1, 0xFFFF); + } + + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_HUMIDITY_OUT_L, I2C_MEMADD_SIZE_8BIT, &buffer[0], 1, 0xFFFF); + HAL_I2C_Mem_Read(&hi2c1, HTS221_ADDR_RD, HTS221_HUMIDITY_OUT_H, I2C_MEMADD_SIZE_8BIT, &buffer[1], 1, 0xFFFF); + H_T_out = (((uint16_t)buffer[1])<<8) | (uint16_t)buffer[0]; + + /*5. 使用线性插值法计算湿度值 RH [%] */ + tmp = ((int32_t)(H_T_out - H0_T0_out)) * ((int32_t)(H1_rh - H0_rh)*10); + *humidity = (tmp/(H1_T0_out - H0_T0_out) + H0_rh*10); + //湿度阈值滤波 + if(*humidity>1000) + { + *humidity = 1000; + } + + return 0; +} diff --git a/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.h b/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.h new file mode 100644 index 00000000..2d0377c0 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/BSP/HardWare/HTS221/HTS221.h @@ -0,0 +1,25 @@ +#ifndef _HTS221_H_ +#define _HTS221_H_ + +#include + +#define HTS221_ADDR_WR 0xBE +#define HTS221_ADDR_RD 0xBF + +#define HTS221_CTRL_REG1 0x20 +#define HTS221_CTRL_REG2 0x21 +#define HTS221_CTRL_REG3 0x22 + +#define HTS221_STATUS_REG 0x27 + +#define HTS221_HUMIDITY_OUT_L 0x28 +#define HTS221_HUMIDITY_OUT_H 0x29 +#define HTS221_TEMP_OUT_L 0x2A +#define HTS221_TEMP_OUT_H 0x2B + +void HTS221_Init(void); + +uint8_t HTS221_Get_Temperature(int16_t* temperature); +uint8_t HTS221_Get_Humidity(int16_t* humidity); + +#endif /* _HTS221_H_ */ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Inc/i2c.h b/board/NUCLEO_STM32L073RZ/BSP/Inc/i2c.h new file mode 100644 index 00000000..5b953f46 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/BSP/Inc/i2c.h @@ -0,0 +1,58 @@ +/** + ****************************************************************************** + * File Name : I2C.h + * Description : This file provides code for the configuration + * of the I2C instances. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __i2c_H +#define __i2c_H +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +extern I2C_HandleTypeDef hi2c1; + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_I2C1_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ i2c_H */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Inc/mcu_init.h b/board/NUCLEO_STM32L073RZ/BSP/Inc/mcu_init.h index 59c3b573..0e9875ee 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Inc/mcu_init.h +++ b/board/NUCLEO_STM32L073RZ/BSP/Inc/mcu_init.h @@ -9,6 +9,7 @@ #include "usart.h" #include "gpio.h" #include "tos.h" +#include "i2c.h" void board_init(void); void SystemClock_Config(void); diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/i2c.c b/board/NUCLEO_STM32L073RZ/BSP/Src/i2c.c new file mode 100644 index 00000000..c1f674d9 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/i2c.c @@ -0,0 +1,118 @@ +/** + ****************************************************************************** + * File Name : I2C.c + * Description : This file provides code for the configuration + * of the I2C instances. + ****************************************************************************** + * @attention + * + *

© Copyright (c) 2019 STMicroelectronics. + * All rights reserved.

+ * + * This software component is licensed by ST under BSD 3-Clause license, + * the "License"; You may not use this file except in compliance with the + * License. You may obtain a copy of the License at: + * opensource.org/licenses/BSD-3-Clause + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "i2c.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +I2C_HandleTypeDef hi2c1; + +/* I2C1 init function */ +void MX_I2C1_Init(void) +{ + + hi2c1.Instance = I2C1; + hi2c1.Init.Timing = 0x00707CBB; + hi2c1.Init.OwnAddress1 = 0; + hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT; + hi2c1.Init.DualAddressMode = I2C_DUALADDRESS_DISABLE; + hi2c1.Init.OwnAddress2 = 0; + hi2c1.Init.OwnAddress2Masks = I2C_OA2_NOMASK; + hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE; + hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE; + if (HAL_I2C_Init(&hi2c1) != HAL_OK) + { + Error_Handler(); + } + /** Configure Analogue filter + */ + if (HAL_I2CEx_ConfigAnalogFilter(&hi2c1, I2C_ANALOGFILTER_ENABLE) != HAL_OK) + { + Error_Handler(); + } + /** Configure Digital filter + */ + if (HAL_I2CEx_ConfigDigitalFilter(&hi2c1, 0) != HAL_OK) + { + Error_Handler(); + } + +} + +void HAL_I2C_MspInit(I2C_HandleTypeDef* i2cHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + if(i2cHandle->Instance==I2C1) + { + /* USER CODE BEGIN I2C1_MspInit 0 */ + + /* USER CODE END I2C1_MspInit 0 */ + + __HAL_RCC_GPIOB_CLK_ENABLE(); + /**I2C1 GPIO Configuration + PB8 ------> I2C1_SCL + PB9 ------> I2C1_SDA + */ + GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9; + GPIO_InitStruct.Mode = GPIO_MODE_AF_OD; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF4_I2C1; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* I2C1 clock enable */ + __HAL_RCC_I2C1_CLK_ENABLE(); + /* USER CODE BEGIN I2C1_MspInit 1 */ + + /* USER CODE END I2C1_MspInit 1 */ + } +} + +void HAL_I2C_MspDeInit(I2C_HandleTypeDef* i2cHandle) +{ + + if(i2cHandle->Instance==I2C1) + { + /* USER CODE BEGIN I2C1_MspDeInit 0 */ + + /* USER CODE END I2C1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_I2C1_CLK_DISABLE(); + + /**I2C1 GPIO Configuration + PB8 ------> I2C1_SCL + PB9 ------> I2C1_SDA + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8|GPIO_PIN_9); + + /* USER CODE BEGIN I2C1_MspDeInit 1 */ + + /* USER CODE END I2C1_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c b/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c index b1222b5c..b7955077 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c @@ -34,6 +34,7 @@ void board_init(void) MX_GPIO_Init(); //MX_USART1_UART_Init(); MX_USART2_UART_Init(); + MX_I2C1_Init(); } diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx index 8af0f1ff..3184fdeb 100644 --- a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx +++ b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx @@ -203,7 +203,7 @@ Application/User - 0 + 1 0 0 0 @@ -279,6 +279,30 @@ 0 0 + + 2 + 8 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\i2c.c + i2c.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + ..\..\BSP\HardWare\HTS221\HTS221.c + HTS221.c + 0 + 0 + @@ -289,7 +313,7 @@ 0 3 - 8 + 10 1 0 0 @@ -301,7 +325,7 @@ 3 - 9 + 11 1 0 0 @@ -313,7 +337,7 @@ 3 - 10 + 12 1 0 0 @@ -325,7 +349,7 @@ 3 - 11 + 13 1 0 0 @@ -337,7 +361,7 @@ 3 - 12 + 14 1 0 0 @@ -349,7 +373,7 @@ 3 - 13 + 15 1 0 0 @@ -361,7 +385,7 @@ 3 - 14 + 16 1 0 0 @@ -373,7 +397,7 @@ 3 - 15 + 17 1 0 0 @@ -385,7 +409,7 @@ 3 - 16 + 18 1 0 0 @@ -397,7 +421,7 @@ 3 - 17 + 19 1 0 0 @@ -409,7 +433,7 @@ 3 - 18 + 20 1 0 0 @@ -421,7 +445,7 @@ 3 - 19 + 21 1 0 0 @@ -433,7 +457,7 @@ 3 - 20 + 22 1 0 0 @@ -445,7 +469,7 @@ 3 - 21 + 23 1 0 0 @@ -457,7 +481,7 @@ 3 - 22 + 24 1 0 0 @@ -469,7 +493,7 @@ 3 - 23 + 25 1 0 0 @@ -481,7 +505,7 @@ 3 - 24 + 26 1 0 0 @@ -501,7 +525,7 @@ 0 4 - 25 + 27 1 0 0 @@ -521,7 +545,7 @@ 0 5 - 26 + 28 1 0 0 @@ -533,7 +557,7 @@ 5 - 27 + 29 1 0 0 @@ -545,7 +569,7 @@ 5 - 28 + 30 2 0 0 @@ -565,7 +589,7 @@ 0 6 - 29 + 31 1 0 0 @@ -577,7 +601,7 @@ 6 - 30 + 32 1 0 0 @@ -589,7 +613,7 @@ 6 - 31 + 33 1 0 0 @@ -601,7 +625,7 @@ 6 - 32 + 34 1 0 0 @@ -613,7 +637,7 @@ 6 - 33 + 35 1 0 0 @@ -625,7 +649,7 @@ 6 - 34 + 36 1 0 0 @@ -637,7 +661,7 @@ 6 - 35 + 37 1 0 0 @@ -649,7 +673,7 @@ 6 - 36 + 38 1 0 0 @@ -661,7 +685,7 @@ 6 - 37 + 39 1 0 0 @@ -673,7 +697,7 @@ 6 - 38 + 40 1 0 0 @@ -685,7 +709,7 @@ 6 - 39 + 41 1 0 0 @@ -697,7 +721,7 @@ 6 - 40 + 42 1 0 0 @@ -709,7 +733,7 @@ 6 - 41 + 43 1 0 0 @@ -721,7 +745,7 @@ 6 - 42 + 44 1 0 0 @@ -733,7 +757,7 @@ 6 - 43 + 45 1 0 0 @@ -745,7 +769,7 @@ 6 - 44 + 46 1 0 0 @@ -757,7 +781,7 @@ 6 - 45 + 47 1 0 0 @@ -769,7 +793,7 @@ 6 - 46 + 48 1 0 0 @@ -781,7 +805,7 @@ 6 - 47 + 49 1 0 0 @@ -793,7 +817,7 @@ 6 - 48 + 50 1 0 0 @@ -805,7 +829,7 @@ 6 - 49 + 51 1 0 0 @@ -817,7 +841,7 @@ 6 - 50 + 52 1 0 0 @@ -829,7 +853,7 @@ 6 - 51 + 53 1 0 0 @@ -841,7 +865,7 @@ 6 - 52 + 54 1 0 0 @@ -861,7 +885,7 @@ 0 7 - 53 + 55 1 0 0 @@ -881,7 +905,7 @@ 0 8 - 54 + 56 1 0 0 @@ -901,7 +925,7 @@ 0 9 - 55 + 57 1 0 0 @@ -921,7 +945,7 @@ 0 10 - 56 + 58 1 0 0 @@ -941,7 +965,7 @@ 0 11 - 57 + 59 1 0 0 @@ -953,7 +977,7 @@ 11 - 58 + 60 1 0 0 @@ -965,7 +989,7 @@ 11 - 59 + 61 1 0 0 diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx index a9a5a3f7..f5509016 100644 --- a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx +++ b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx @@ -338,7 +338,7 @@ USE_HAL_DRIVER,STM32L073xx,USE_HAL_DRIVER,STM32L073xx - ..\..\BSP\Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc/Legacy;../../../../platform/vendor_bsp/st/CMSIS/Device/ST/STM32L0xx/Include;../../../../platform/vendor_bsp/st/CMSIS/Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\kernel\hal\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\devices\rhf76_lora;..\..\..\..\net\at\include;..\..\..\..\net\lora_module_wrapper + ..\..\BSP\Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc/Legacy;../../../../platform/vendor_bsp/st/CMSIS/Device/ST/STM32L0xx/Include;../../../../platform/vendor_bsp/st/CMSIS/Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\kernel\hal\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\devices\rhf76_lora;..\..\..\..\net\at\include;..\..\..\..\net\lora_module_wrapper;..\..\BSP\HardWare\HTS221 @@ -422,6 +422,16 @@ 1 ..\..\BSP\Src\stm32l0xx_it_lorawan.c + + i2c.c + 1 + ..\..\BSP\Src\i2c.c + + + HTS221.c + 1 + ..\..\BSP\HardWare\HTS221\HTS221.c +