本文整理汇总了C++中PHAL_RUART_OP::HalRuartDeInit方法的典型用法代码示例。如果您正苦于以下问题:C++ PHAL_RUART_OP::HalRuartDeInit方法的具体用法?C++ PHAL_RUART_OP::HalRuartDeInit怎么用?C++ PHAL_RUART_OP::HalRuartDeInit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PHAL_RUART_OP
的用法示例。
在下文中一共展示了PHAL_RUART_OP::HalRuartDeInit方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serial_free
void serial_free(serial_t *obj)
{
PHAL_RUART_ADAPTER pHalRuartAdapter;
PHAL_RUART_OP pHalRuartOp;
#ifdef CONFIG_GDMA_EN
u8 uart_idx;
PUART_DMA_CONFIG pHalRuartDmaCfg;
#endif
pHalRuartAdapter = &(obj->hal_uart_adp);
pHalRuartOp = &(obj->hal_uart_op);
pHalRuartOp->HalRuartDeInit(pHalRuartAdapter);
#ifdef CONFIG_GDMA_EN
uart_idx = pHalRuartAdapter->UartIndex;
pHalRuartDmaCfg = &obj->uart_gdma_cfg;
if (serial_dma_en[uart_idx] & SERIAL_RX_DMA_EN) {
HalRuartRxGdmaDeInit(pHalRuartDmaCfg);
serial_dma_en[uart_idx] &= ~SERIAL_RX_DMA_EN;
}
if (serial_dma_en[uart_idx] & SERIAL_TX_DMA_EN) {
HalRuartTxGdmaDeInit(pHalRuartDmaCfg);
serial_dma_en[uart_idx] &= ~SERIAL_TX_DMA_EN;
}
#endif
// TODO: recovery Pin Mux
}
示例2: serial_free
void serial_free(serial_t *obj)
{
PHAL_RUART_ADAPTER pHalRuartAdapter;
PHAL_RUART_OP pHalRuartOp;
pHalRuartAdapter = &(obj->hal_uart_adp);
pHalRuartOp = &(obj->hal_uart_op);
pHalRuartOp->HalRuartDeInit(pHalRuartAdapter);
// TODO: recovery Pin Mux
#if 0
RtlMfree((unsigned char *)(obj->uart_adp.pHalRuartOp), sizeof(HAL_RUART_OP));
RtlMfree((unsigned char *)(obj->uart_adp.pHalRuartAdapter), sizeof(HAL_RUART_ADAPTER));
obj->uart_adp.pHalRuartOp = NULL;
obj->uart_adp.pHalRuartAdapter = NULL;
#endif
}