USART_Smartcard
[STM32F10x_StdPeriph_Examples]

Data Structures

struct  SC_ATR

Enumerations

enum  TestStatus {
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED,
  FAILED = 0, PASSED = !FAILED, FAILED = 0, PASSED = !FAILED
}

Functions

void BusFault_Handler (void)
 This function handles Bus Fault exception.
void DebugMon_Handler (void)
 This function handles Debug Monitor exception.
void EXTI15_10_IRQHandler (void)
 This function handles External lines 15 to 10 interrupt request.
void EXTI9_5_IRQHandler (void)
 This function handles External lines 9 to 5 interrupt request.
void EXTI_Configuration (void)
 Configures the External Interrupts controller.
void GPIO_Configuration (void)
 Configures the different GPIO ports.
void HardFault_Handler (void)
 This function handles Hard Fault exception.
int main (void)
 Main program.
void MemManage_Handler (void)
 This function handles Memory Manage exception.
void NMI_Handler (void)
 This function handles NMI exception.
void NVIC_Configuration (void)
 Configures the nested vectored interrupt controller.
void PendSV_Handler (void)
 This function handles PendSV_Handler exception.
void RCC_Configuration (void)
 Configures the different system clocks.
uint8_t SC_decode_Answer2reset (__IO uint8_t *card)
 Decode the Card ATR Response.
void SC_USART_IRQHandler (void)
 This function handles SC_USART global interrupt request.
void SVC_Handler (void)
 This function handles SVCall exception.
void SysTick_Handler (void)
 This function handles SysTick Handler.
void UsageFault_Handler (void)
 This function handles Usage Fault exception.

Variables

volatile TestStatus ATRDecodeStatus = FAILED
__IO uint32_t CardInserted
__IO uint32_t CardInserted = 0
__IO uint32_t CardProtocol = 1
__IO uint32_t Counter = 0
__IO uint8_t DST_Buffer [50]
__IO uint32_t index = 0
SC_ATR SC_A2R
USART_ClockInitTypeDef USART_ClockInitStructure
USART_InitTypeDef USART_InitStructure

Enumeration Type Documentation

enum TestStatus
Enumerator:
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 
FAILED 
PASSED 

Definition at line 51 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.


Function Documentation

void BusFault_Handler ( void   ) 

This function handles Bus Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 88 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void DebugMon_Handler ( void   ) 

This function handles Debug Monitor exception.

Parameters:
None 
Return values:
None 

Definition at line 123 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void EXTI15_10_IRQHandler ( void   ) 
void EXTI9_5_IRQHandler ( void   ) 

This function handles External lines 9 to 5 interrupt request.

This function handles EXTI Lines 9 to 5 interrupts requests.

Parameters:
None 
Return values:
None 

Definition at line 154 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

References CardInserted, EXTI_ClearITPendingBit(), GPIO_ResetBits(), and GPIO_SetBits().

void EXTI_Configuration ( void   ) 
void GPIO_Configuration ( void   ) 
void HardFault_Handler ( void   ) 

This function handles Hard Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 62 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

int main ( void   ) 
void MemManage_Handler ( void   ) 

This function handles Memory Manage exception.

Parameters:
None 
Return values:
None 

Definition at line 75 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void NMI_Handler ( void   ) 

This function handles NMI exception.

Parameters:
None 
Return values:
None 

Definition at line 53 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void NVIC_Configuration ( void   ) 
void PendSV_Handler ( void   ) 

This function handles PendSV_Handler exception.

Parameters:
None 
Return values:
None 

Definition at line 132 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void RCC_Configuration ( void   ) 

Configures the different system clocks.

Parameters:
None 
Return values:
None 

Definition at line 191 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

References ENABLE, RCC_APB1PeriphClockCmd(), RCC_APB2Periph_AFIO, and RCC_APB2PeriphClockCmd().

uint8_t SC_decode_Answer2reset ( __IO uint8_t *  card  ) 

Decode the Card ATR Response.

Parameters:
card,: pointer to the buffer containing the Card ATR.
Return values:
Card protocol

Definition at line 309 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

References SC_ATR::H, HIST_LENGHT, SC_ATR::Hlenght, SETUP_LENGHT, SC_ATR::T, SC_ATR::T0, SC_ATR::Tlenght, and SC_ATR::TS.

Referenced by main().

void SC_USART_IRQHandler ( void   ) 

This function handles SC_USART global interrupt request.

Parameters:
None 
Return values:
None 

Definition at line 177 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

References DISABLE, ENABLE, RESET, USART_GetITStatus(), USART_IT_PE, USART_IT_RXNE, USART_ITConfig(), and USART_ReceiveData().

void SVC_Handler ( void   ) 

This function handles SVCall exception.

Parameters:
None 
Return values:
None 

Definition at line 114 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void SysTick_Handler ( void   ) 

This function handles SysTick Handler.

Parameters:
None 
Return values:
None 

Definition at line 141 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.

void UsageFault_Handler ( void   ) 

This function handles Usage Fault exception.

Parameters:
None 
Return values:
None 

Definition at line 101 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/stm32f10x_it.c.


Variable Documentation

volatile TestStatus ATRDecodeStatus = FAILED

Definition at line 59 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

Referenced by main().

__IO uint32_t CardInserted
__IO uint32_t CardInserted = 0
__IO uint32_t CardProtocol = 1

Definition at line 60 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

Referenced by main().

__IO uint32_t Counter = 0

Definition at line 58 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

Referenced by main().

__IO uint8_t DST_Buffer[50]
Initial value:
 {
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                     0, 0, 0, 0, 0, 0, 0, 0, 0, 0}

Definition at line 62 of file STM32F10x_StdPeriph_Examples/USART/Smartcard/main.c.

__IO uint32_t index = 0
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32