Go to the source code of this file.
◆ S7816_TRx_PinDef
Define 7816 TRx pin.
Enumerator |
---|
S7816_TRX_D0 | |
S7816_TRX_D3 | |
S7816_TRX_D7 | |
◆ S7816_Half_Duplex_ModeDef
Enumerator |
---|
S7816_TX | |
S7816_RX | |
◆ s7816_set_clk()
void s7816_set_clk |
( |
unsigned char |
Div | ) |
|
This function is used to initiate 7816 module of MCU.
- Parameters
-
[in] | Div | -set the divider of clock of 7816 module: 7816clk = sysclk/(0x7b[6:4]*2), 0x7b[7]:enable 7816clk 7816clk: 0x40-2Mhz 0x20-4Mhz baudrate: 0x40-16194 0x20-32388 |
- Returns
- none
◆ s7816_set_rx_buf()
void s7816_set_rx_buf |
( |
unsigned short * |
RecvAddr, |
|
|
unsigned short |
RecvBufLen |
|
) |
| |
This function is used to set address and size of buffer 7816 module of MCU.
- Parameters
-
[in] | *RecvAddr | -set the address of buffer to receive data |
[in] | RecvBufLen | -set the length of buffer to receive data |
- Returns
- none
◆ s7816_set_pin()
This function is used to initiate 7816 module of MCU.
- Parameters
-
[in] | Pin_7816_TRX | -select the I/O pin of 7816 module |
[in] | Pin_7816_RST | -select the RST pin of 7816 module |
[in] | Pin_7816_VCC | -select the VCC pin of 7816 module |
- Returns
- none
◆ s7816_dma_send()
unsigned char s7816_dma_send |
( |
unsigned char * |
TransAddr | ) |
|
This function is used to send data to ID card,after succeeding in getting ATR.
- Parameters
-
[in] | *TransAddr | - data is waitting to send |
- Returns
- none
◆ s7816_set_half_duplex()
This function is used to transform half duplex mode of 7816.
- Parameters
-
[in] | mode | - half_duplex_mode_TX/RX is transformed by setting 0x9b[5] 0x9b[5]=1:half_duplex_mode_RX;0x9b[5]=0:half_duplex_mode_TX |
- Returns
- none