/*!
    \file  readme.txt
    \brief description of the SmartCard T0 protocol example
    
    \version 2023-08-01, V1.0.0, HAL firmware for GD32F3x0
*/

/*
    Copyright (c) 2023, GigaDevice Semiconductor Inc.

    Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this
       list of conditions and the following disclaimer.
    2. Redistributions in binary form must reproduce the above copyright notice,
       this list of conditions and the following disclaimer in the documentation
       and/or other materials provided with the distribution.
    3. Neither the name of the copyright holder nor the names of its contributors
       may be used to endorse or promote products derived from this software without
       specific prior written permission.

    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.
*/

  This demo is based on the GD32F350R-EVAL-V1.0, it shows how to use smartcard interface 
in USART peripheral by using SMART-CARD MODULE.

  The main purpose of this firmware example is to provide resources facilitating 
the development of an application using the USART peripheral in smartcard mode.

  The firmware interface is composed of library source files developed in order to 
support ISO7816-3/4 specification, an application example is also provided. In this 
routine, PSAM CPU card is used as the experimental object, which follows the T0 
protocol.

  In order to make the example work, the hardware platform must be connected as follows:
  - PA8  is connected to SC_CLK
  - PA9  is connected to SC_IO
  - PB11 is connected to SC_RST
  - PB6  is connected to SC_DETECT
  - PB13 is connected to SC_5V3V
  - PB15 is connected to SC_SETVCC

  In this routine, you can modify transmission mode in the smartcard.h file by configuring 
the corresponding macro to 1. Which has three modes: interrupt, poll, and DMA.
