/* This function is used to To stop current DMA channel transfer.  */
unsigned char tls_dma_stop(unsigned char ch)
/* This function is used to To stop current DMA channel transfer.  */
unsigned char tls_dma_stop(unsigned char ch)
{
	if(ch > 7) return 1;
	if(DMA_CHNLCTRL_REG(ch) & DMA_CHNL_CTRL_CHNL_ON)
	{
		DMA_CHNLCTRL_REG(ch) |= DMA_CHNL_CTRL_CHNL_OFF;
		while(DMA_CHNLCTRL_REG(ch) & DMA_CHNL_CTRL_CHNL_ON);
	}
	return 0;
}