/**
  ******************************************************************************
  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * Copyright (C) 2018 Shanghai Eastsoft Microelectronics Co., Ltd. ALL rights reserved.
  *******************************************************************************
  */

<--------------------------------------------------------------------------------
Version history:
--------------------------------------------------------------------------------->
2018-10-29	V1.0.0	AE TEAM


<--------------------------------------------------------------------------------
Demo introduction:
--------------------------------------------------------------------------------->

@pin connection: 

	SPI_NSS ---- PA1
	SPI_SCK ---- PA5
	SPI_MISO --- PA6
	SPI_MOSI --- PA7	

@how to use

This demo show how to use ALD library drivers to send and receive data use spi module by interrupt.

At the beginning of the main program, the ald_cmu_init() function is called to initialize
the ALD library.The systic is configured as the default value"SYSTICK_INTERVAL_1MS"
(ststic interrupt occur per 1ms) in "utils.c",you can change the value in
application.To use the ALD library the ald_cmu_init() function should be called
firstly,and ald_inc_tick_weak() function should be called in SysTick_Handler().

In ald_dma_init() function,the DMA controller is enabled and the NVIC of DMA interrupt
is enabled if ALD_DMA defined.

In user_init() function,the following items is required:
    1) Config NVIC;
    2) Config GPIO;
    3) Config SPI by calling ald_spi_init() function;

<--------------------------------------------------------------------------------
The main document introduction:
--------------------------------------------------------------------------------->
system:
startup_es32f0xx.s ------- Startup file

user:
irq.c -------------------- Interrupt handlers file
main.c ------------------- Main source file
main.h ------------------- Main header file

ald lib:
utils.c ------------------ ALD drivers configuration file
ald_cmu.c ---------------- CMU ALD drivers file
ald_dma.c ---------------- DMA ALD drivers file
ald_gpio.c --------------- GPIO ALD drivers file
ald_spi.c ---------------- SPI ALD drivers file