1
0
forked from me/IronOS

Port unreliable but starter PD setup

This commit is contained in:
Ben V. Brown
2020-07-22 22:39:20 +10:00
parent 164c402d1c
commit 6097216b24
2 changed files with 2 additions and 2 deletions

View File

@@ -13,7 +13,7 @@
#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 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;
StaticSemaphore_t I2CBB::xSemaphoreBuffer;
SemaphoreHandle_t I2CBB::I2CSemaphore2 = NULL;

View File

@@ -43,7 +43,7 @@ void Setup_HAL() {
MX_ADC2_Init();
MX_TIM3_Init();
MX_TIM2_Init();
// MX_IWDG_Init();
MX_IWDG_Init();
HAL_ADC_Start(&hadc2);
HAL_ADCEx_MultiModeStart_DMA(&hadc1, (uint32_t*) ADCReadings, 64); // start DMA of normal readings
HAL_ADCEx_InjectedStart(&hadc1); // enable injected readings