From 32df2ae55601f1ad135247ad79a913514d018032 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Fri, 21 Jan 2022 21:30:00 +0000 Subject: stm32_ipcc: helper methods to ease porting ST code Make it a litle easier to read for some bits that are constantly checked. Signed-off-by: Karl Palsson --- wpan/stm32_ipcc.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'wpan/stm32_ipcc.h') diff --git a/wpan/stm32_ipcc.h b/wpan/stm32_ipcc.h index e264d8b..c631ecf 100644 --- a/wpan/stm32_ipcc.h +++ b/wpan/stm32_ipcc.h @@ -19,4 +19,36 @@ template class STM32_IPCC_t : public mmio_ptr { public: using mmio_ptr::ptr; + + bool tx_pending(uint32_t channel) const { + bool unmasked = ~(ptr()->C1MR) & ((1<C1TOC2SR & (1<C1MR) & (1<C2TOC1SR & (1<C1SCR = (1<C1SCR = (1<C1MR &= ~(1<C1MR |= (1<C1MR &= ~((1<C1MR |= (1<