Port unreliable but starter PD setup
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
#define SDA_LOW() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_RESET)
|
#define SDA_LOW() HAL_GPIO_WritePin(SDA2_GPIO_Port, SDA2_Pin, GPIO_PIN_RESET)
|
||||||
#define SDA_READ() (HAL_GPIO_ReadPin(SDA2_GPIO_Port,SDA2_Pin)==GPIO_PIN_SET?1:0)
|
#define SDA_READ() (HAL_GPIO_ReadPin(SDA2_GPIO_Port,SDA2_Pin)==GPIO_PIN_SET?1:0)
|
||||||
#define SCL_READ() (HAL_GPIO_ReadPin(SCL2_GPIO_Port,SCL2_Pin)==GPIO_PIN_SET?1:0)
|
#define SCL_READ() (HAL_GPIO_ReadPin(SCL2_GPIO_Port,SCL2_Pin)==GPIO_PIN_SET?1:0)
|
||||||
#define I2C_DELAY() {for(int xx=0;xx<20;xx++){asm("nop");}}
|
#define I2C_DELAY() {for(int xx=0;xx<100;xx++){asm("nop");}}
|
||||||
SemaphoreHandle_t I2CBB::I2CSemaphore = NULL;
|
SemaphoreHandle_t I2CBB::I2CSemaphore = NULL;
|
||||||
StaticSemaphore_t I2CBB::xSemaphoreBuffer;
|
StaticSemaphore_t I2CBB::xSemaphoreBuffer;
|
||||||
SemaphoreHandle_t I2CBB::I2CSemaphore2 = NULL;
|
SemaphoreHandle_t I2CBB::I2CSemaphore2 = NULL;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ void Setup_HAL() {
|
|||||||
MX_ADC2_Init();
|
MX_ADC2_Init();
|
||||||
MX_TIM3_Init();
|
MX_TIM3_Init();
|
||||||
MX_TIM2_Init();
|
MX_TIM2_Init();
|
||||||
// MX_IWDG_Init();
|
MX_IWDG_Init();
|
||||||
HAL_ADC_Start(&hadc2);
|
HAL_ADC_Start(&hadc2);
|
||||||
HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*) ADCReadings, 64); // start DMA of normal readings
|
HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*) ADCReadings, 64); // start DMA of normal readings
|
||||||
HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings
|
HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings
|
||||||
|
|||||||
Reference in New Issue
Block a user