Added ADC implementation for STM32

This commit is contained in:
dvdb97
2023-07-16 21:17:14 +02:00
parent 0d02d57cbb
commit 266cc46a09
2 changed files with 51 additions and 2 deletions

View File

@@ -11,10 +11,26 @@ namespace sta
class STM32ADC
{
public:
STM32ADC();
/**
* @param handle A handle to a STM32 ADC.
*/
STM32ADC(ADC_HandleTypeDef * handle);
/**
* @brief Starts conversion of the incoming analog signal.
*/
void start();
/**
* @brief
*
* @param timeout
*/
void poll(uint32_t timeout);
uint32_t getValue();
private:
ADC_HandleTypeDef * handle_;
};
} // namespace sta