summaryrefslogtreecommitdiff
path: root/chip/stm32/usb_pd_phy.c
diff options
context:
space:
mode:
Diffstat (limited to 'chip/stm32/usb_pd_phy.c')
-rw-r--r--chip/stm32/usb_pd_phy.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/chip/stm32/usb_pd_phy.c b/chip/stm32/usb_pd_phy.c
index 4417cd3f54..4a4e63b51b 100644
--- a/chip/stm32/usb_pd_phy.c
+++ b/chip/stm32/usb_pd_phy.c
@@ -349,6 +349,12 @@ void pd_rx_complete(void)
dma_disable(DMAC_TIM_RX);
}
+int pd_rx_started(void)
+{
+ /* is the sampling timer running ? */
+ return STM32_TIM_CR1(TIM_RX) & 1;
+}
+
void pd_rx_enable_monitoring(void)
{
/* clear comparator external interrupt */