/*
 * LPSPI_SpiDrv.h
 *
 *  Created on: 2020Äê10ÔÂ14ÈÕ
 *      Author: zhou_l4
 */

#ifndef DRIVER_SPI_LPSPI_SPIDRV_H_
#define DRIVER_SPI_LPSPI_SPIDRV_H_

typedef void ( *SPI_CallbackType )( uint8_t * );

void DMA0_TCD_init(uint8_t *src_addr,uint16_t len);
void DMA1_TCD_init(uint8_t *dest_addr,uint16_t len);
void LPSPI0_init_slave(void);
void SPI_PORT_init (void);
void DMA_init(void);
void WDOG_disable(void);		   /* Disable WDOG */
void SOSC_init_8MHz(void);        /* Initialize system oscillator for 8 MHz xtal */
void SPLL_init_160MHz(void);      /* Initialize SPLL to 160 MHz with 8 MHz SOSC */
void NormalRUNmode_80MHz(void);
void SPI2_init(void);
void SPI0_init(void);
void DMA2_TCD_init(uint8_t *src_addr,uint16_t len);
void LPSPI2_transmit_8bits (uint8_t *send,uint16_t len);
void SPI_Set_Call_Back_Func( SPI_CallbackType pSPI_CallBack , uint8_t aucCallBackID );
void SPI2_Information_Registrant_Func( uint8_t *aucpMessageBuff , uint8_t aucCallBackID );
extern void LPSPI2_Deinit_master(void);
#endif /* DRIVER_SPI_LPSPI_SPIDRV_H_ */
