add reset dev i2c slave id
This commit is contained in:
parent
635918ca35
commit
02ba2481c7
|
@ -24,7 +24,7 @@
|
|||
#include "X-WL55_WLE5_53L0X.h"
|
||||
|
||||
#include "stm32wlxx_hal.h"
|
||||
|
||||
#include "main.h"
|
||||
|
||||
#ifndef HAL_I2C_MODULE_ENABLED
|
||||
#define HAL_I2C_MODULE_ENABLED
|
||||
|
@ -196,6 +196,16 @@ int XWL55_WLE5_53L0X_Init(void)
|
|||
}
|
||||
|
||||
|
||||
void XWL55_WLE5_53L0X_Reset(void)
|
||||
{
|
||||
|
||||
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_RESET);
|
||||
HAL_Delay(30);
|
||||
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(30);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @} X-WL55_WLE5_53L0X_top
|
||||
|
|
|
@ -231,6 +231,8 @@ int XWL55_WLE5_53L0X_Init(void);
|
|||
int XNUCLEO53L1A1_ResetId(int DevNo, int state );
|
||||
|
||||
|
||||
void XWL55_WLE5_53L0X_Reset(void);
|
||||
|
||||
/**
|
||||
* Enable Disable interrupt at MCU level (MSP)
|
||||
*
|
||||
|
|
|
@ -131,10 +131,7 @@ int sts_tof_vl53l0x_DetectSensors(void)
|
|||
int FinalAddress;
|
||||
nDevPresent = 0;
|
||||
|
||||
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_RESET);
|
||||
HAL_Delay(10);
|
||||
HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(10);
|
||||
XWL55_WLE5_53L0X_Reset();
|
||||
//HAL_GPIO_WritePin(TOF_C_XSHUT_GPIO_Port, TOF_C_XSHUT_Pin, GPIO_PIN_SET);
|
||||
//HAL_Delay(100);
|
||||
|
||||
|
|
Loading…
Reference in New Issue