NANO100_BSP V3.04.002
The Board Support Package for Nano100BN Series
NuEdu-Basic01_SPI_Flash_w_PDMA.h
Go to the documentation of this file.
1/**************************************************************************/
12#ifndef __NuEdu_Basic01_SPI_FLASH_W_PDMA_H__
13#define __NuEdu_Basic01_SPI_FLASH_W_PDMA_H__
26/*---------------------------------------------------------------------------------------------------------*/
27/* Functions */
28/*---------------------------------------------------------------------------------------------------------*/
29extern void Open_SPI_Flash(void);
30extern void Init_PDMA_CH1_for_SPI0_TX(uint32_t u32SrcAddr);
31extern void Init_PDMA_CH2_for_SPI0_RX(uint32_t u32DstAddr);
32extern unsigned int SpiFlash_w_PDMA_ReadMidDid(void);
33extern void SpiFlash_w_PDMA_ChipErase(void);
34extern unsigned int SpiFlash_w_PDMA_ReadStatusReg1(void);
35extern unsigned int SpiFlash_w_PDMA_ReadStatusReg2(void);
36extern void SpiFlash_w_PDMA_WaitReady(void);
37extern void SpiFlash_w_PDMA_PageProgram(unsigned int StartAddress, unsigned int ByteCount);
38extern void SpiFlash_w_PDMA_ReadData(unsigned int StartAddress, unsigned int ByteCount);
39
40#endif /* end of group Nano130_Basic01_FUNCTIONS */
42 /* end of group NuEdu-SDK-Nano130_Basic01 */
44 /* end of group NANO100_Library */
46
47/*** (C) COPYRIGHT 2013-2014 Nuvoton Technology Corp. ***/
unsigned int SpiFlash_w_PDMA_ReadStatusReg2(void)
Read back the Status Register 2 from SPI Flash device.
void SpiFlash_w_PDMA_WaitReady(void)
Waiting for the BUSY bit of SPI Flash that be cleared to 0.
unsigned int SpiFlash_w_PDMA_ReadMidDid(void)
Read back the Manufacturer ID and Device ID from SPI Flash device.
void SpiFlash_w_PDMA_ChipErase(void)
This function do the chip erasing to SPI Flash device.
void SpiFlash_w_PDMA_PageProgram(unsigned int StartAddress, unsigned int ByteCount)
This function do the page programming to SPI Flash device.
void Open_SPI_Flash(void)
Open GPIO port for SPI interface and configure this SPI controller as Master, MSB first,...
void Init_PDMA_CH1_for_SPI0_TX(uint32_t u32SrcAddr)
This function initializes the PDMA channel 1 for SPI0 transmitting TX and the data that will be trans...
unsigned int SpiFlash_w_PDMA_ReadStatusReg1(void)
Read back the Status Register 1 from SPI Flash device.
void Init_PDMA_CH2_for_SPI0_RX(uint32_t u32DstAddr)
This function initializes the PDMA channel 2 for SPI0 receiving RX and the receiving data will be sto...
void SpiFlash_w_PDMA_ReadData(unsigned int StartAddress, unsigned int ByteCount)
This function do the data reading from SPI Flash device.