v0.5.0 #19

Merged
klassents merged 310 commits from v0.5.0 into main 2025-04-28 07:06:11 +03:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit a5b21d6065 - Show all commits

View File

@ -71,6 +71,7 @@ volatile uint32_t* portOutputRegister(GPIO_TypeDef* GPIO_x);
volatile uint32_t* portInputRegister(GPIO_TypeDef* GPIO_x);
// the function initializes additional MCU pins depending on the specified pin number
void additionalPinsInit(uint32_t PinNumber);
void additionalPinsDeinit(uint32_t PinNumber);
// UART
// available uarts quantity

View File

@ -142,6 +142,16 @@ void additionalPinsInit(uint32_t PinNumber)
}
}
void additionalPinsDeinit(uint32_t PinNumber)
{
if (PinNumber == A4 || PinNumber == A5)
{
// select A7 via switches selaA, selaB to allow using A4 and A5 as digital outputs
HAL_GPIO_WritePin(SELA_A_PORT, SELA_A_PIN, GPIO_PIN_HIGH);
HAL_GPIO_WritePin(SELA_B_PORT, SELA_B_PIN, GPIO_PIN_HIGH);
}
}
// ---------------------- ADC ---------------------- //
// determines the ADC channel number by the board pin number
uint32_t analogInputToChannelNumber(uint32_t PinNumber)