fix bug : 解决i2c 一直忙问题, 修正气压计无读数bug 修正ci gcc version ,10.3.1 导致pg 数据错误
This commit is contained in:
parent
26c0979c92
commit
4cf1fd3a1d
|
@ -143,13 +143,6 @@ endif
|
|||
|
||||
DSP_LIB :=
|
||||
|
||||
ifneq ($(DEBUG),GDB)
|
||||
OPTIMISE_DEFAULT := -Os
|
||||
OPTIMISE_SPEED :=
|
||||
OPTIMISE_SIZE :=
|
||||
|
||||
LTO_FLAGS := $(OPTIMISATION_BASE) $(OPTIMISE_DEFAULT)
|
||||
endif
|
||||
|
||||
DEVICE_FLAGS += -DARM_MATH_MATRIX_CHECK -DARM_MATH_ROUNDING -DUNALIGNED_SUPPORT_DISABLE -DARM_MATH_CM4
|
||||
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
##############################
|
||||
|
||||
# Set up ARM (STM32) SDK
|
||||
ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-10.3-2021.10
|
||||
ARM_SDK_DIR ?= $(TOOLS_DIR)/gcc-arm-none-eabi-9-2020-q2-update
|
||||
# Checked below, Should match the output of $(shell arm-none-eabi-gcc -dumpversion)
|
||||
GCC_REQUIRED_VERSION ?= 10.3.1
|
||||
GCC_REQUIRED_VERSION ?= 9.3.1
|
||||
|
||||
.PHONY: arm_sdk_version
|
||||
|
||||
|
@ -26,7 +26,7 @@ arm_sdk_version:
|
|||
## arm_sdk_install : Install Arm SDK
|
||||
.PHONY: arm_sdk_install
|
||||
|
||||
ARM_SDK_URL_BASE := https://developer.arm.com/-/media/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10
|
||||
ARM_SDK_URL_BASE := https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update
|
||||
|
||||
# source: https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads
|
||||
ifeq ($(OSFAMILY), linux)
|
||||
|
|
|
@ -143,7 +143,7 @@ bool i2cWriteBuffer(I2CDevice device, uint8_t addr_, uint8_t reg_, uint8_t len_,
|
|||
|
||||
i2c_status_type status;
|
||||
//i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout)
|
||||
status = i2c_memory_write_int(pHandle ,addr_ << 1, reg_,data, len_,I2C_TIMEOUT_US);
|
||||
status = i2c_memory_write(pHandle ,addr_ << 1, reg_,data, len_,I2C_TIMEOUT_US);
|
||||
|
||||
if (status == I2C_ERR_STEP_1) {//BUSY
|
||||
return false;
|
||||
|
@ -213,7 +213,7 @@ bool i2cReadBuffer(I2CDevice device, uint8_t addr_, uint8_t reg_, uint8_t len, u
|
|||
|
||||
i2c_status_type status;
|
||||
|
||||
status = i2c_memory_read_int(pHandle, addr_ << 1, reg_,buf, len,I2C_TIMEOUT_US);
|
||||
status = i2c_memory_read(pHandle, addr_ << 1, reg_,buf, len,I2C_TIMEOUT_US);
|
||||
|
||||
if (status == I2C_ERR_STEP_1) {//busy
|
||||
return false;
|
||||
|
@ -234,17 +234,17 @@ bool i2cBusy(I2CDevice device, bool *error)
|
|||
*error = pHandle->error_code>0 ?true:false;
|
||||
}
|
||||
|
||||
if (pHandle->status == I2C_END)
|
||||
{
|
||||
if (i2c_flag_get(pHandle->i2cx, I2C_BUSYF_FLAG) == SET)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if(pHandle->error_code !=I2C_OK){
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
if (i2c_flag_get(pHandle->i2cx, I2C_BUSYF_FLAG) == SET)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue