Files
kunlun/driver/inc/dma_uart.h
2024-09-28 14:24:04 +08:00

40 lines
1.6 KiB
C

/****************************************************************************
Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
be copied by any method or incorporated into another program without
the express written consent of Aerospace C.Power. This Information or any portion
thereof remains the property of Aerospace C.Power. The Information contained herein
is believed to be accurate and Aerospace C.Power assumes no responsibility or
liability for its use in any way and conveys no license or title under
any patent or copyright and makes no representation or warranty that this
Information is free from patent or copyright infringement.
****************************************************************************/
#ifndef _DMA_UART_H_
#define _DMA_UART_H_
#ifdef __cplusplus
extern "C" {
#endif
int uart_dma_p_2_d(int pt);
int uart_dma_d_2_p(int dev);
int uart_dma_p_2_v(int pt);
void uart_dma_init(int port, int br);
void uart_dma_read_with_task_callback(uint8_t *bufptr, uint32_t size, void (*callback) (void*, uint32_t), void* dummy, uint8_t pause);
void uart_dma_read(uint8_t *bufptr, uint32_t size, void (*callback) (void*, uint32_t), void* dummy, uint8_t pause);
void uart_dma_write(uint8_t *bufptr, uint32_t size, void (*callback) (void*, uint32_t), void* dummy);
int uart_dma_flow_ctrl_set(int port, int type, int thr);
void uart_dma_finish_transfers(int port);
void uart_dma_stop_recv(void);
#ifdef __cplusplus
}
#endif
#endif