Added analogRead to GPIO
This commit is contained in:
@@ -107,6 +107,13 @@ void SHAL_GPIO::useAsExternalInterrupt(TriggerMode mode, EXTICallback callback)
|
||||
__enable_irq(); //Enable IRQ just in case
|
||||
}
|
||||
|
||||
uint16_t SHAL_GPIO::analogRead(ADC_SampleTime sampleTime) {
|
||||
|
||||
ADC_Channel channel = getGPIOPortInfo(m_GPIO_KEY).ADCChannel;
|
||||
|
||||
return GPIOManager::getGPIOADC().singleConvertSingle(channel,sampleTime);
|
||||
}
|
||||
|
||||
|
||||
SHAL_GPIO& GPIOManager::get(GPIO_Key key) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user