forked from Elron_dev/elbear_arduino_bsp
добавлена функция возвращающая ссылку на адрес OUTPUT регистра GPIO
This commit is contained in:
parent
321d083288
commit
24d402bdc9
@ -62,6 +62,8 @@ GPIO_TypeDef* digitalPinToPort(uint32_t digPinNumber);
|
||||
HAL_PinsTypeDef digitalPinToBitMask(uint32_t digPinNumber);
|
||||
// оtotal number of pins available for initialization
|
||||
uint16_t pinCommonQty(void);
|
||||
// the function returns a reference to the OUTPUT address of the GPIO register
|
||||
uint32_t* portOutputRegister(GPIO_TypeDef* GPIO_x);
|
||||
|
||||
// ADC
|
||||
// determines the ADC channel number by the board pin number
|
||||
|
||||
@ -94,6 +94,12 @@ uint16_t pinCommonQty(void)
|
||||
return (uint16_t)(sizeof(digitalPinToGpioPinArray)/sizeof(digitalPinToGpioPinArray[0]));
|
||||
}
|
||||
|
||||
// the function returns a reference to the OUTPUT address of the GPIO register
|
||||
uint32_t* portOutputRegister(GPIO_TypeDef* GPIO_x)
|
||||
{
|
||||
return &GPIO_x->OUTPUT_;
|
||||
}
|
||||
|
||||
// ---------------------- АЦП ---------------------- //
|
||||
// determines the ADC channel number by the board pin number
|
||||
uint32_t analogInputToChannelNumber(uint32_t PinNumber)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user