mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/sta-core.git
synced 2025-06-10 00:36:00 +00:00
Update doc
This commit is contained in:
parent
460f4e3c25
commit
e4f5e3cd2e
@ -19,7 +19,7 @@
|
||||
/**
|
||||
* @defgroup stm32Clocks Clocks
|
||||
* @ingroup stm32
|
||||
* @brief STM32 clock queries.
|
||||
* @brief STM32 Clock queries.
|
||||
* @{
|
||||
*/
|
||||
|
||||
@ -36,11 +36,28 @@
|
||||
#define STA_STM32_GET_PCLK_FREQ_FN(n) HAL_RCC_GetPCLK ## n ## Freq
|
||||
|
||||
|
||||
// Internal helper for macro expansion
|
||||
/**
|
||||
* @brief Internal helper for macro expansion.
|
||||
*
|
||||
* @param n PCLK index
|
||||
* @return Function returning PCLK frequency
|
||||
*/
|
||||
#define _STA_STM32_GET_PCLK_FREQ_FN(n) STA_STM32_GET_PCLK_FREQ_FN(n)
|
||||
// Get instance to PCLK index map macro
|
||||
/**
|
||||
* @brief Map instance name to PCLK index.
|
||||
*
|
||||
* @param type Hardware type
|
||||
* @param idx Instance index
|
||||
* @return PCLK index
|
||||
*/
|
||||
#define _STA_STM32_PCLK_IDX_MAP(type, idx) STA_STM32_ ## type ## _ ## idx ## _PCLK_IDX
|
||||
// Get HAL handle to PCLK index map macro
|
||||
/**
|
||||
* @brief Map instance handle to PCLK index.
|
||||
*
|
||||
* @param handle HAL handle
|
||||
* @return PCLK index
|
||||
*/
|
||||
#define _STA_STM32_HANDLE_PCLK_IDX_MAP(handle) STA_STM32_ ## handle ## _PCLK_IDX
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
/**
|
||||
* @defgroup stm32GPIO GPIO
|
||||
* @ingroup stm32
|
||||
* @brief STM GPIO module.
|
||||
* @brief STM32 GPIO module.
|
||||
*/
|
||||
|
||||
#ifdef DOXYGEN
|
||||
@ -40,13 +40,32 @@ namespace sta
|
||||
class STM32GpioPin : public GpioPin
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @param port GPIO port
|
||||
* @param pin Pin index
|
||||
*/
|
||||
STM32GpioPin(GPIO_TypeDef * port, uint16_t pin);
|
||||
|
||||
void setState(GpioPinState state) override;
|
||||
|
||||
/**
|
||||
* @brief Get GPIO port for pin.
|
||||
*
|
||||
* @return GPIO port
|
||||
*/
|
||||
GPIO_TypeDef * getPort() const;
|
||||
/**
|
||||
* @brief Get pin index for pin.
|
||||
*
|
||||
* @return Pin index
|
||||
*/
|
||||
uint16_t getPin() const;
|
||||
uint8_t getIndex() const;
|
||||
/**
|
||||
* @brief Get GPIO port index for pin.
|
||||
*
|
||||
* @return GPIO port index
|
||||
*/
|
||||
uint8_t getPortIndex() const;
|
||||
|
||||
private:
|
||||
GPIO_TypeDef * port_; /**< GPIO port */
|
||||
@ -64,6 +83,13 @@ namespace sta
|
||||
BOTH /**< Rising and falling edge */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Check pin EXIT pin configuration.
|
||||
*
|
||||
* @param pin GPIO pin
|
||||
* @param edge Interrupt trigger edge
|
||||
* @return True if EXIT pin and trigger edge matches
|
||||
*/
|
||||
bool isInterruptEdge(const STM32GpioPin & pin, InterruptEdge edge);
|
||||
} // namespace sta
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace sta
|
||||
return pin_;
|
||||
}
|
||||
|
||||
uint8_t STM32GpioPin::getIndex() const
|
||||
uint8_t STM32GpioPin::getPortIndex() const
|
||||
{
|
||||
return GPIO_GET_INDEX(port_);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user