From a8aaabae4c1cc64a01d740a436336ca31c1f79ba Mon Sep 17 00:00:00 2001 From: iperry <iperry@749a229e-a60e-11de-b98f-4500b42dc123> Date: Thu, 17 Dec 2009 02:46:08 +0000 Subject: removed extraneous files, stm32lib examples git-svn-id: https://leaflabs.googlecode.com/svn/trunk/library@70 749a229e-a60e-11de-b98f-4500b42dc123 --- src/stm32lib/examples/USART/Smartcard/main.c | 444 ----------- .../examples/USART/Smartcard/platform_config.h | 74 -- src/stm32lib/examples/USART/Smartcard/readme.txt | 87 --- .../examples/USART/Smartcard/stm32f10x_conf.h | 170 ---- .../examples/USART/Smartcard/stm32f10x_it.c | 851 --------------------- .../examples/USART/Smartcard/stm32f10x_it.h | 100 --- 6 files changed, 1726 deletions(-) delete mode 100755 src/stm32lib/examples/USART/Smartcard/main.c delete mode 100755 src/stm32lib/examples/USART/Smartcard/platform_config.h delete mode 100755 src/stm32lib/examples/USART/Smartcard/readme.txt delete mode 100755 src/stm32lib/examples/USART/Smartcard/stm32f10x_conf.h delete mode 100755 src/stm32lib/examples/USART/Smartcard/stm32f10x_it.c delete mode 100755 src/stm32lib/examples/USART/Smartcard/stm32f10x_it.h (limited to 'src/stm32lib/examples/USART/Smartcard') diff --git a/src/stm32lib/examples/USART/Smartcard/main.c b/src/stm32lib/examples/USART/Smartcard/main.c deleted file mode 100755 index 5f26ba4..0000000 --- a/src/stm32lib/examples/USART/Smartcard/main.c +++ /dev/null @@ -1,444 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : main.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main program body -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" -#include "platform_config.h" - -/* Private define ------------------------------------------------------------*/ -#define T0_PROTOCOL 0x00 /* T0 PROTOCOL */ -#define SETUP_LENGHT 20 -#define HIST_LENGHT 20 -#define SC_Receive_Timeout 0x4000 /* direction to reader */ - -/* Private typedef -----------------------------------------------------------*/ -/* ATR STRUCTURE - ANSWER TO RESET */ -typedef struct -{ - u8 TS; /* Bit Convention */ - u8 T0; /* high nibble = N. of setup byte; low nibble = N. of historical byte */ - u8 T[SETUP_LENGHT]; /* setup array */ - u8 H[HIST_LENGHT]; /* historical array */ - u8 Tlenght; /* setup array dimension */ - u8 Hlenght; /* historical array dimension */ -} SC_ATR; - -typedef enum {FAILED = 0, PASSED = !FAILED} TestStatus; - -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -USART_InitTypeDef USART_InitStructure; -USART_ClockInitTypeDef USART_ClockInitStructure; -SC_ATR SC_A2R; -vu32 index = 0, Counter = 0; -volatile TestStatus ATRDecodeStatus = FAILED; -vu32 CardInserted = 0, CardProtocol = 1; -ErrorStatus HSEStartUpStatus; -vu8 DST_Buffer[50]= {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}; - -/* Private function prototypes -----------------------------------------------*/ -/* Private functions ---------------------------------------------------------*/ -void RCC_Configuration(void); -void GPIO_Configuration(void); -void EXTI_Configuration(void); -void NVIC_Configuration(void); -u8 SC_decode_Answer2reset(vu8 *card); - -/******************************************************************************* -* Function Name : main -* Description : Main program -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -int main(void) -{ -#ifdef DEBUG - debug(); -#endif - - /* System Clocks Configuration */ - RCC_Configuration(); - - /* NVIC configuration */ - NVIC_Configuration(); - - /* Configure the GPIO ports */ - GPIO_Configuration(); - - /* Configure the EXTI Controller */ - EXTI_Configuration(); - - -/* USART3 configuration -------------------------------------------------------*/ - /* USART3 configured as follow: - - Word Length = 9 Bits - - 0.5 Stop Bit - - Even parity - - BaudRate = 12096 baud - - Hardware flow control disabled (RTS and CTS signals) - - Tx and Rx enabled - - USART Clock enabled - - USART CPOL Low - - USART CPHA on first edge - - USART Last Bit Clock Enabled - */ - - /* USART Clock set to 4.5MHz (PCLK1 = 36 MHZ / 8) */ - USART_SetPrescaler(USART3, 0x04); - /* USART Guard Time set to 2 Bit */ - USART_SetGuardTime(USART3, 0x2); - - USART_ClockInitStructure.USART_Clock = USART_Clock_Enable; - USART_ClockInitStructure.USART_CPOL = USART_CPOL_Low; - USART_ClockInitStructure.USART_CPHA = USART_CPHA_1Edge; - USART_ClockInitStructure.USART_LastBit = USART_LastBit_Enable; - USART_ClockInit(USART3, &USART_ClockInitStructure); - - USART_InitStructure.USART_BaudRate = 12096; - USART_InitStructure.USART_WordLength = USART_WordLength_9b; - USART_InitStructure.USART_StopBits = USART_StopBits_1_5; - USART_InitStructure.USART_Parity = USART_Parity_Even; - USART_InitStructure.USART_Mode = USART_Mode_Rx | USART_Mode_Tx; - USART_InitStructure.USART_HardwareFlowControl = USART_HardwareFlowControl_None; - USART_Init(USART3, &USART_InitStructure); - - /* Enable the USART3 Parity Error Interrupt */ - USART_ITConfig(USART3, USART_IT_PE, ENABLE); - - /* Enable USART3 */ - USART_Cmd(USART3, ENABLE); - - /* Enable the NACK Transmission */ - USART_SmartCardNACKCmd(USART3, ENABLE); - - /* Enable the Smartcard Interface */ - USART_SmartCardCmd(USART3, ENABLE); - - - /* Loop while no Smartcard is detected */ - while(CardInserted == 0) - { - } - - /* Read Smartcard ATR response */ - for(index = 0; index < 40; index++, Counter = 0) - { - while((USART_GetFlagStatus(USART3, USART_FLAG_RXNE) == RESET) && (Counter != SC_Receive_Timeout)) - { - Counter++; - } - - if(Counter != SC_Receive_Timeout) - { - DST_Buffer[index] = USART_ReceiveData(USART3); - } - } - - /* Decode ATR */ - CardProtocol = SC_decode_Answer2reset(DST_Buffer); - - /* Test if the inserted card is ISO7816-3 T=0 compatible */ - if(CardProtocol == 0) - { - /* Inserted card is ISO7816-3 T=0 compatible */ - ATRDecodeStatus = PASSED; - } - else - { - /* Inserted Smartcard is not ISO7816-3 T=0 compatible */ - ATRDecodeStatus = FAILED; - } - - while (1) - { - } -} - -/******************************************************************************* -* Function Name : RCC_Configuration -* Description : Configures the different system clocks. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_Configuration(void) -{ - /* RCC system reset(for debug purpose) */ - RCC_DeInit(); - - /* Enable HSE */ - RCC_HSEConfig(RCC_HSE_ON); - - /* Wait till HSE is ready */ - HSEStartUpStatus = RCC_WaitForHSEStartUp(); - - if(HSEStartUpStatus == SUCCESS) - { - /* Enable Prefetch Buffer */ - FLASH_PrefetchBufferCmd(FLASH_PrefetchBuffer_Enable); - - /* Flash 2 wait state */ - FLASH_SetLatency(FLASH_Latency_2); - - /* HCLK = SYSCLK */ - RCC_HCLKConfig(RCC_SYSCLK_Div1); - - /* PCLK2 = HCLK */ - RCC_PCLK2Config(RCC_HCLK_Div1); - - /* PCLK1 = HCLK/2 */ - RCC_PCLK1Config(RCC_HCLK_Div2); - - /* PLLCLK = 8MHz * 9 = 72 MHz */ - RCC_PLLConfig(RCC_PLLSource_HSE_Div1, RCC_PLLMul_9); - - /* Enable PLL */ - RCC_PLLCmd(ENABLE); - - /* Wait till PLL is ready */ - while(RCC_GetFlagStatus(RCC_FLAG_PLLRDY) == RESET) - { - } - - /* Select PLL as system clock source */ - RCC_SYSCLKConfig(RCC_SYSCLKSource_PLLCLK); - - /* Wait till PLL is used as system clock source */ - while(RCC_GetSYSCLKSource() != 0x08) - { - } - } - - /* Enable GPIO_3_5V, GPIOB, GPIO_CMDVCC, GPIO_RESET, GPIO_OFF and AFIO clocks */ - RCC_APB2PeriphClockCmd(RCC_APB2Periph_3_5V | RCC_APB2Periph_GPIOB | RCC_APB2Periph_RESET | - RCC_APB2Periph_CMDVCC | RCC_APB2Periph_OFF | RCC_APB2Periph_AFIO, ENABLE); - - /* Enable USART3 clocks */ - RCC_APB1PeriphClockCmd(RCC_APB1Periph_USART3, ENABLE); -} - -/******************************************************************************* -* Function Name : GPIO_Configuration -* Description : Configures the different GPIO ports. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void GPIO_Configuration(void) -{ - GPIO_InitTypeDef GPIO_InitStructure; - - /* Configure USART3 CK(PB12) as alternate function push-pull */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_12; - GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; - GPIO_Init(GPIOB, &GPIO_InitStructure); - - /* Configure USART3 Tx (PB10) as alternate function open-drain */ - GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_OD; - GPIO_Init(GPIOB, &GPIO_InitStructure); - - /* Configure Smartcard Reset */ - GPIO_InitStructure.GPIO_Pin = SC_RESET; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; - GPIO_Init(GPIO_RESET, &GPIO_InitStructure); - - /* Set RSTIN HIGH */ - GPIO_SetBits(GPIO_RESET, SC_RESET); - - /* Configure Smartcard 3/5V */ - GPIO_InitStructure.GPIO_Pin = SC_3_5V; - GPIO_Init(GPIO_3_5V, &GPIO_InitStructure); - - /* Select 5 V */ - GPIO_SetBits(GPIO_3_5V, SC_3_5V); - - /* Configure Smartcard CMDVCC */ - GPIO_InitStructure.GPIO_Pin = SC_CMDVCC; - GPIO_Init(GPIO_CMDVCC, &GPIO_InitStructure); - - /* Select Smartcard CMDVCC */ - GPIO_SetBits(GPIO_CMDVCC, SC_CMDVCC); - - /* Select Smartcard OFF */ - GPIO_InitStructure.GPIO_Pin = SC_OFF; - GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; - GPIO_Init(GPIO_OFF, &GPIO_InitStructure); -} - -/******************************************************************************* -* Function Name : EXTI_Configuration -* Description : Configures the External Interrupts controller. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI_Configuration(void) -{ - EXTI_InitTypeDef EXTI_InitStructure; - - /* Smartcard OFF */ - GPIO_EXTILineConfig(SC_PortSource, SC_PinSource); - - EXTI_StructInit(&EXTI_InitStructure); - EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt; - EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising; - EXTI_InitStructure.EXTI_Line = SC_EXTI; - EXTI_InitStructure.EXTI_LineCmd = ENABLE; - EXTI_Init(&EXTI_InitStructure); - - /* Clear SC EXTI Line Pending Bit */ - EXTI_ClearITPendingBit(SC_EXTI); -} - -/******************************************************************************* -* Function Name : NVIC_Configuration -* Description : Configures the nested vectored interrupt controller. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NVIC_Configuration(void) -{ - NVIC_InitTypeDef NVIC_InitStructure; - -#ifdef VECT_TAB_RAM - /* Set the Vector Table base location at 0x20000000 */ - NVIC_SetVectorTable(NVIC_VectTab_RAM, 0x0); -#else /* VECT_TAB_FLASH */ - /* Set the Vector Table base location at 0x08000000 */ - NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); -#endif - - /* Configure the NVIC Preemption Priority Bits */ - NVIC_PriorityGroupConfig(NVIC_PriorityGroup_1); - /* Clear the SC_EXTI IRQ Pending Bit */ - NVIC_ClearIRQChannelPendingBit(SC_EXTI_IRQ); - - NVIC_InitStructure.NVIC_IRQChannel = SC_EXTI_IRQ; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; - NVIC_Init(&NVIC_InitStructure); - - NVIC_InitStructure.NVIC_IRQChannel = USART3_IRQChannel; - NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 1; - NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0; - NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE; - NVIC_Init(&NVIC_InitStructure); -} - -/******************************************************************************* -* Function Name : SC_decode_Answer2reset -* Description : Decode the Card ATR Response. -* Input : - card: pointer to the buffer containing the Card ATR. -* Output : None -* Return : Card protocol -*******************************************************************************/ -u8 SC_decode_Answer2reset(vu8 *card) -{ - u32 i = 0, flag = 0, buf = 0, protocol = 0; - - SC_A2R.TS = 0; - SC_A2R.T0 = 0; - for (i = 0; i < SETUP_LENGHT; i++) - { - SC_A2R.T[i] = 0; - } - for (i = 0;i < HIST_LENGHT; i++) - { - SC_A2R.H[i] = 0; - } - SC_A2R.Tlenght = 0; - SC_A2R.Hlenght = 0; - - SC_A2R.TS = card[0]; /* INITIAL CHARACTER */ - SC_A2R.T0 = card[1]; /* FORMAT CHARACTER */ - - SC_A2R.Hlenght = SC_A2R.T0 & 0x0F; - - if((SC_A2R.T0 & 0x80) == 0x80) flag = 1; - - for(i = 0; i < 4; i++) - { - SC_A2R.Tlenght = SC_A2R.Tlenght + (((SC_A2R.T0 & 0xF0) >> (4 + i)) & 0x1); - } - - for(i = 0; i < SC_A2R.Tlenght; i++) - { - SC_A2R.T[i] = card[i + 2]; - } - - protocol = SC_A2R.T[SC_A2R.Tlenght - 1] & 0x0F; - - while(flag) - { - if ((SC_A2R.T[SC_A2R.Tlenght-1] & 0x80)== 0x80) - { - flag = 1; - } - else - { - flag = 0; - } - buf = SC_A2R.Tlenght; - SC_A2R.Tlenght = 0; - - for(i = 0; i < 4; i++) - { - SC_A2R.Tlenght = SC_A2R.Tlenght + (((SC_A2R.T[buf - 1] & 0xF0) >> (4 + i)) & 0x1); - } - for(i = 0; i < SC_A2R.Tlenght; i++) - { - SC_A2R.T[buf + i] = card[i + 2 + buf]; - } - SC_A2R.Tlenght += buf; - } - - for(i = 0;i < SC_A2R.Hlenght; i++) - { - SC_A2R.H[i] = card[i + 2 + SC_A2R.Tlenght]; - } - - return ((u8)protocol); -} - -#ifdef DEBUG -/******************************************************************************* -* Function Name : assert_failed -* Description : Reports the name of the source file and the source line number -* where the assert_param error has occurred. -* Input : - file: pointer to the source file name -* - line: assert_param error line source number -* Output : None -* Return : None -*******************************************************************************/ -void assert_failed(u8* file, u32 line) -{ - /* User can add his own implementation to report the file name and line number, - ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */ - - /* Infinite loop */ - while (1) - { - } -} -#endif - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/USART/Smartcard/platform_config.h b/src/stm32lib/examples/USART/Smartcard/platform_config.h deleted file mode 100755 index 455d148..0000000 --- a/src/stm32lib/examples/USART/Smartcard/platform_config.h +++ /dev/null @@ -1,74 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : platform_config.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Evaluation board specific configuration file. -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __PLATFORM_CONFIG_H -#define __PLATFORM_CONFIG_H - -/* Includes ------------------------------------------------------------------*/ -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line corresponding to the STMicroelectronics evaluation board - used to run the example */ -#if !defined (USE_STM3210B_EVAL) && !defined (USE_STM3210E_EVAL) - //#define USE_STM3210B_EVAL - #define USE_STM3210E_EVAL -#endif - -/* Define the STM32F10x hardware depending on the used evaluation board */ -#ifdef USE_STM3210B_EVAL - /* Smartcard Inteface GPIO pins */ - #define SC_3_5V GPIO_Pin_11 /* GPIOD Pin 11 */ - #define SC_RESET GPIO_Pin_11 /* GPIOB Pin 11 */ - #define SC_CMDVCC GPIO_Pin_7 /* GPIOE Pin 7 */ - #define SC_OFF GPIO_Pin_14 /* GPIOE Pin 14 */ - #define GPIO_3_5V GPIOD - #define GPIO_RESET GPIOB - #define GPIO_CMDVCC GPIOE - #define GPIO_OFF GPIOE - #define RCC_APB2Periph_3_5V RCC_APB2Periph_GPIOD - #define RCC_APB2Periph_RESET RCC_APB2Periph_GPIOB - #define RCC_APB2Periph_CMDVCC RCC_APB2Periph_GPIOE - #define RCC_APB2Periph_OFF RCC_APB2Periph_GPIOE - #define SC_EXTI EXTI_Line14 - #define SC_PortSource GPIO_PortSourceGPIOE - #define SC_PinSource GPIO_PinSource14 - #define SC_EXTI_IRQ EXTI15_10_IRQChannel -#elif defined USE_STM3210E_EVAL - /* Smartcard Inteface GPIO pins */ - #define SC_3_5V GPIO_Pin_0 /* GPIOB Pin 0 */ - #define SC_RESET GPIO_Pin_11 /* GPIOB Pin 11 */ - #define SC_CMDVCC GPIO_Pin_6 /* GPIOC Pin 6 */ - #define SC_OFF GPIO_Pin_7 /* GPIOC Pin 7 */ - #define GPIO_3_5V GPIOB - #define GPIO_RESET GPIOB - #define GPIO_CMDVCC GPIOC - #define GPIO_OFF GPIOC - #define RCC_APB2Periph_3_5V RCC_APB2Periph_GPIOB - #define RCC_APB2Periph_RESET RCC_APB2Periph_GPIOB - #define RCC_APB2Periph_CMDVCC RCC_APB2Periph_GPIOC - #define RCC_APB2Periph_OFF RCC_APB2Periph_GPIOC - #define SC_EXTI EXTI_Line7 - #define SC_PortSource GPIO_PortSourceGPIOC - #define SC_PinSource GPIO_PinSource7 - #define SC_EXTI_IRQ EXTI9_5_IRQChannel -#endif /* USE_STM3210B_EVAL */ - -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -#endif /* __PLATFORM_CONFIG_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/USART/Smartcard/readme.txt b/src/stm32lib/examples/USART/Smartcard/readme.txt deleted file mode 100755 index 615be2a..0000000 --- a/src/stm32lib/examples/USART/Smartcard/readme.txt +++ /dev/null @@ -1,87 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : readme.txt -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Description of the USART Smartcard Example. -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -Example description -=================== -This example provides a description of how to use the USART in Smartcard mode. -The example gives only the possibility to read the ATR and decode it into -predefined buffer. -First, the code is waiting for an card insertion. If a card is detected through -the EXTI Line interrupt (connected to the Smartcard detect pin), a reset signal -is applied to the card through its reset pin. -As response to this reset, the card transmit the ATR which will be stored in -predefined buffer. Once the ATR is received, it is decoded and stored in a specific -structure (SC_A2R) and the card protocol type is stored in a variable. -ATRDecodeStatus variable must be equal to 1 (PASSED) when the sequence succeed. - -The used Smartcard should be ISO7816-3 T=0 compatible. - -USART3 configured as follow: - - Word Length = 9 Bits - - 0.5 Stop Bit - - Even parity - - BaudRate = 12096 baud - - Hardware flow control disabled (RTS and CTS signals) - - Tx and Rx enabled - - USART Clock enabled - - USART CPOL: Clock is active low - - USART CPHA: Data is captured on the second edge - - USART LastBit: The clock pulse of the last data bit is not output to - the SCLK pin - - -Directory contents -================== -platform_config.h Evaluation board specific configuration file -stm32f10x_conf.h Library Configuration file -stm32f10x_it.h Interrupt handlers header file -stm32f10x_it.c Interrupt handlers -main.c Main program - - -Hardware environment -==================== -This example runs on STMicroelectronics STM3210B-EVAL and STM3210E-EVAL evaluation -boards and can be easily tailored to any other hardware. -To select the STMicroelectronics evaluation board used to run the example, uncomment -the corresponding line in platform_config.h file. - - + STM3210B-EVAL - - Plug a Smartcard (ISO7816-3 T=0 compatible) into the dedicated Smartcard - connector CN16. - - + STM3210E-EVAL - - Plug a Smartcard (ISO7816-3 T=0 compatible) into the dedicated Smartcard - connector CN18. - - Make sure that Jumper 15 (JP15) and Jumper 16 (JP16) are fitted. - - -How to use it -============= -In order to make the program work, you must do the following : -- Create a project and setup all your toolchain's start-up files -- Compile the directory content files and required Library files : - + stm32f10x_lib.c - + stm32f10x_gpio.c - + stm32f10x_rcc.c - + stm32f10x_usart.c - + stm32f10x_nvic.c - + stm32f10x_flash.c - + stm32f10x_exti.c - -- Link all compiled files and load your image into target memory -- Run the example - -******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****** diff --git a/src/stm32lib/examples/USART/Smartcard/stm32f10x_conf.h b/src/stm32lib/examples/USART/Smartcard/stm32f10x_conf.h deleted file mode 100755 index 5dfe126..0000000 --- a/src/stm32lib/examples/USART/Smartcard/stm32f10x_conf.h +++ /dev/null @@ -1,170 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_conf.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Library configuration file. -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_CONF_H -#define __STM32F10x_CONF_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_type.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Uncomment the line below to compile the library in DEBUG mode, this will expanse - the "assert_param" macro in the firmware library code (see "Exported macro" - section below) */ -/*#define DEBUG 1*/ - -/* Comment the line below to disable the specific peripheral inclusion */ -/************************************* ADC ************************************/ -//#define _ADC -//#define _ADC1 -//#define _ADC2 -//#define _ADC3 - -/************************************* BKP ************************************/ -//#define _BKP - -/************************************* CAN ************************************/ -//#define _CAN - -/************************************* CRC ************************************/ -//#define _CRC - -/************************************* DAC ************************************/ -//#define _DAC - -/************************************* DBGMCU *********************************/ -//#define _DBGMCU - -/************************************* DMA ************************************/ -//#define _DMA -//#define _DMA1_Channel1 -//#define _DMA1_Channel2 -//#define _DMA1_Channel3 -//#define _DMA1_Channel4 -//#define _DMA1_Channel5 -//#define _DMA1_Channel6 -//#define _DMA1_Channel7 -//#define _DMA2_Channel1 -//#define _DMA2_Channel2 -//#define _DMA2_Channel3 -//#define _DMA2_Channel4 -//#define _DMA2_Channel5 - -/************************************* EXTI ***********************************/ -#define _EXTI - -/************************************* FLASH and Option Bytes *****************/ -#define _FLASH -/* Uncomment the line below to enable FLASH program/erase/protections functions, - otherwise only FLASH configuration (latency, prefetch, half cycle) functions - are enabled */ -/* #define _FLASH_PROG */ - -/************************************* FSMC ***********************************/ -//#define _FSMC - -/************************************* GPIO ***********************************/ -#define _GPIO -//#define _GPIOA -#define _GPIOB -#define _GPIOC -#define _GPIOD -#define _GPIOE -//#define _GPIOF -//#define _GPIOG -#define _AFIO - -/************************************* I2C ************************************/ -//#define _I2C -//#define _I2C1 -//#define _I2C2 - -/************************************* IWDG ***********************************/ -//#define _IWDG - -/************************************* NVIC ***********************************/ -#define _NVIC - -/************************************* PWR ************************************/ -//#define _PWR - -/************************************* RCC ************************************/ -#define _RCC - -/************************************* RTC ************************************/ -//#define _RTC - -/************************************* SDIO ***********************************/ -//#define _SDIO - -/************************************* SPI ************************************/ -//#define _SPI -//#define _SPI1 -//#define _SPI2 -//#define _SPI3 - -/************************************* SysTick ********************************/ -//#define _SysTick - -/************************************* TIM ************************************/ -//#define _TIM -//#define _TIM1 -//#define _TIM2 -//#define _TIM3 -//#define _TIM4 -//#define _TIM5 -//#define _TIM6 -//#define _TIM7 -//#define _TIM8 - -/************************************* USART **********************************/ -#define _USART -//#define _USART1 -//#define _USART2 -#define _USART3 -//#define _UART4 -//#define _UART5 - -/************************************* WWDG ***********************************/ -//#define _WWDG - -/* In the following line adjust the value of External High Speed oscillator (HSE) - used in your application */ -#define HSE_Value ((u32)8000000) /* Value of the External oscillator in Hz*/ - -/* Exported macro ------------------------------------------------------------*/ -#ifdef DEBUG -/******************************************************************************* -* Macro Name : assert_param -* Description : The assert_param macro is used for function's parameters check. -* It is used only if the library is compiled in DEBUG mode. -* Input : - expr: If expr is false, it calls assert_failed function -* which reports the name of the source file and the source -* line number of the call that failed. -* If expr is true, it returns no value. -* Return : None -*******************************************************************************/ - #define assert_param(expr) ((expr) ? (void)0 : assert_failed((u8 *)__FILE__, __LINE__)) -/* Exported functions ------------------------------------------------------- */ - void assert_failed(u8* file, u32 line); -#else - #define assert_param(expr) ((void)0) -#endif /* DEBUG */ - -#endif /* __STM32F10x_CONF_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.c b/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.c deleted file mode 100755 index 3f2c264..0000000 --- a/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.c +++ /dev/null @@ -1,851 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.c -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : Main Interrupt Service Routines. -* This file provides template for all exceptions handler -* and peripherals interrupt service routine. -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_it.h" -#include "platform_config.h" - -/* Private typedef -----------------------------------------------------------*/ -/* Private define ------------------------------------------------------------*/ -/* Private macro -------------------------------------------------------------*/ -/* Private variables ---------------------------------------------------------*/ -extern vu32 CardInserted; - -/* Private function prototypes -----------------------------------------------*/ -/* Private functions ---------------------------------------------------------*/ - -/******************************************************************************* -* Function Name : NMIException -* Description : This function handles NMI exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void NMIException(void) -{ -} - -/******************************************************************************* -* Function Name : HardFaultException -* Description : This function handles Hard Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void HardFaultException(void) -{ - /* Go to infinite loop when Hard Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : MemManageException -* Description : This function handles Memory Manage exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void MemManageException(void) -{ - /* Go to infinite loop when Memory Manage exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : BusFaultException -* Description : This function handles Bus Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void BusFaultException(void) -{ - /* Go to infinite loop when Bus Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : UsageFaultException -* Description : This function handles Usage Fault exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UsageFaultException(void) -{ - /* Go to infinite loop when Usage Fault exception occurs */ - while (1) - { - } -} - -/******************************************************************************* -* Function Name : DebugMonitor -* Description : This function handles Debug Monitor exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DebugMonitor(void) -{ -} - -/******************************************************************************* -* Function Name : SVCHandler -* Description : This function handles SVCall exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SVCHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PendSVC -* Description : This function handles PendSVC exception. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PendSVC(void) -{ -} - -/******************************************************************************* -* Function Name : SysTickHandler -* Description : This function handles SysTick Handler. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SysTickHandler(void) -{ -} - -/******************************************************************************* -* Function Name : WWDG_IRQHandler -* Description : This function handles WWDG interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void WWDG_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : PVD_IRQHandler -* Description : This function handles PVD interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void PVD_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TAMPER_IRQHandler -* Description : This function handles Tamper interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TAMPER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RTC_IRQHandler -* Description : This function handles RTC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FLASH_IRQHandler -* Description : This function handles Flash interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FLASH_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : RCC_IRQHandler -* Description : This function handles RCC interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RCC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI0_IRQHandler -* Description : This function handles External interrupt Line 0 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI1_IRQHandler -* Description : This function handles External interrupt Line 1 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI2_IRQHandler -* Description : This function handles External interrupt Line 2 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI3_IRQHandler -* Description : This function handles External interrupt Line 3 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI4_IRQHandler -* Description : This function handles External interrupt Line 4 request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel1_IRQHandler -* Description : This function handles DMA1 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel2_IRQHandler -* Description : This function handles DMA1 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel3_IRQHandler -* Description : This function handles DMA1 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel4_IRQHandler -* Description : This function handles DMA1 Channel 4 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel5_IRQHandler -* Description : This function handles DMA1 Channel 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel6_IRQHandler -* Description : This function handles DMA1 Channel 6 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA1_Channel7_IRQHandler -* Description : This function handles DMA1 Channel 7 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA1_Channel7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC1_2_IRQHandler -* Description : This function handles ADC1 and ADC2 global interrupts requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC1_2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_HP_CAN_TX_IRQHandler -* Description : This function handles USB High Priority or CAN TX interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_HP_CAN_TX_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USB_LP_CAN_RX0_IRQHandler -* Description : This function handles USB Low Priority or CAN RX0 interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USB_LP_CAN_RX0_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_RX1_IRQHandler -* Description : This function handles CAN RX1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_RX1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : CAN_SCE_IRQHandler -* Description : This function handles CAN SCE interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void CAN_SCE_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : EXTI9_5_IRQHandler -* Description : This function handles External lines 9 to 5 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI9_5_IRQHandler(void) -{ - /* Select Smart Card CMDVCC */ - GPIO_ResetBits(GPIO_CMDVCC, SC_CMDVCC); - - /* Set RSTIN LOW */ - GPIO_ResetBits(GPIO_RESET, SC_RESET); - - /* Set RSTIN HIGH */ - GPIO_SetBits(GPIO_RESET, SC_RESET); - - /* Clear SC EXTIT Line Pending Bit */ - EXTI_ClearITPendingBit(SC_EXTI); - - /* Smart card detected */ - CardInserted = 1; -} - -/******************************************************************************* -* Function Name : TIM1_BRK_IRQHandler -* Description : This function handles TIM1 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_UP_IRQHandler -* Description : This function handles TIM1 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_TRG_COM_IRQHandler -* Description : This function handles TIM1 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM1_CC_IRQHandler -* Description : This function handles TIM1 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM1_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM2_IRQHandler -* Description : This function handles TIM2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM3_IRQHandler -* Description : This function handles TIM3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM4_IRQHandler -* Description : This function handles TIM4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_EV_IRQHandler -* Description : This function handles I2C1 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C1_ER_IRQHandler -* Description : This function handles I2C1 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C1_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_EV_IRQHandler -* Description : This function handles I2C2 Event interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_EV_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : I2C2_ER_IRQHandler -* Description : This function handles I2C2 Error interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void I2C2_ER_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI1_IRQHandler -* Description : This function handles SPI1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI2_IRQHandler -* Description : This function handles SPI2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART1_IRQHandler -* Description : This function handles USART1 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART2_IRQHandler -* Description : This function handles USART2 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USART3_IRQHandler -* Description : This function handles USART3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USART3_IRQHandler(void) -{ - /* If the USART3 detects a parity error */ - if(USART_GetITStatus(USART3, USART_IT_PE) != RESET) - { - while(USART_GetFlagStatus(USART3, USART_FLAG_RXNE) == RESET) - { - } - /* Clear the USART3 Parity error pending bit */ - USART_ClearITPendingBit(USART3, USART_IT_PE); - USART_ReceiveData(USART3); - } -} - -/******************************************************************************* -* Function Name : EXTI15_10_IRQHandler -* Description : This function handles External lines 15 to 10 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void EXTI15_10_IRQHandler(void) -{ - /* Select Smart Card CMDVCC */ - GPIO_ResetBits(GPIO_CMDVCC, SC_CMDVCC); - - /* Set RSTIN LOW */ - GPIO_ResetBits(GPIO_RESET, SC_RESET); - - /* Set RSTIN HIGH */ - GPIO_SetBits(GPIO_RESET, SC_RESET); - - /* Clear SC EXTIT Line Pending Bit */ - EXTI_ClearITPendingBit(SC_EXTI); - - /* Smart card detected */ - CardInserted = 1; -} - -/******************************************************************************* -* Function Name : RTCAlarm_IRQHandler -* Description : This function handles RTC Alarm interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void RTCAlarm_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : USBWakeUp_IRQHandler -* Description : This function handles USB WakeUp interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void USBWakeUp_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_BRK_IRQHandler -* Description : This function handles TIM8 Break interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_BRK_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_UP_IRQHandler -* Description : This function handles TIM8 overflow and update interrupt -* request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_UP_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_TRG_COM_IRQHandler -* Description : This function handles TIM8 Trigger and commutation interrupts -* requests. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_TRG_COM_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM8_CC_IRQHandler -* Description : This function handles TIM8 capture compare interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM8_CC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : ADC3_IRQHandler -* Description : This function handles ADC3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void ADC3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : FSMC_IRQHandler -* Description : This function handles FSMC global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void FSMC_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SDIO_IRQHandler -* Description : This function handles SDIO global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SDIO_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM5_IRQHandler -* Description : This function handles TIM5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : SPI3_IRQHandler -* Description : This function handles SPI3 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void SPI3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART4_IRQHandler -* Description : This function handles UART4 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART4_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : UART5_IRQHandler -* Description : This function handles UART5 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void UART5_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM6_IRQHandler -* Description : This function handles TIM6 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM6_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : TIM7_IRQHandler -* Description : This function handles TIM7 global interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void TIM7_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel1_IRQHandler -* Description : This function handles DMA2 Channel 1 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel1_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel2_IRQHandler -* Description : This function handles DMA2 Channel 2 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel2_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel3_IRQHandler -* Description : This function handles DMA2 Channel 3 interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel3_IRQHandler(void) -{ -} - -/******************************************************************************* -* Function Name : DMA2_Channel4_5_IRQHandler -* Description : This function handles DMA2 Channel 4 and DMA2 Channel 5 -* interrupt request. -* Input : None -* Output : None -* Return : None -*******************************************************************************/ -void DMA2_Channel4_5_IRQHandler(void) -{ -} - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ diff --git a/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.h b/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.h deleted file mode 100755 index e74b6cc..0000000 --- a/src/stm32lib/examples/USART/Smartcard/stm32f10x_it.h +++ /dev/null @@ -1,100 +0,0 @@ -/******************** (C) COPYRIGHT 2008 STMicroelectronics ******************** -* File Name : stm32f10x_it.h -* Author : MCD Application Team -* Version : V2.0.1 -* Date : 06/13/2008 -* Description : This file contains the headers of the interrupt handlers. -******************************************************************************** -* THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS -* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. -* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, -* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE -* CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING -* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS. -*******************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------*/ -#ifndef __STM32F10x_IT_H -#define __STM32F10x_IT_H - -/* Includes ------------------------------------------------------------------*/ -#include "stm32f10x_lib.h" - -/* Exported types ------------------------------------------------------------*/ -/* Exported constants --------------------------------------------------------*/ -/* Exported macro ------------------------------------------------------------*/ -/* Exported functions ------------------------------------------------------- */ - -void NMIException(void); -void HardFaultException(void); -void MemManageException(void); -void BusFaultException(void); -void UsageFaultException(void); -void DebugMonitor(void); -void SVCHandler(void); -void PendSVC(void); -void SysTickHandler(void); -void WWDG_IRQHandler(void); -void PVD_IRQHandler(void); -void TAMPER_IRQHandler(void); -void RTC_IRQHandler(void); -void FLASH_IRQHandler(void); -void RCC_IRQHandler(void); -void EXTI0_IRQHandler(void); -void EXTI1_IRQHandler(void); -void EXTI2_IRQHandler(void); -void EXTI3_IRQHandler(void); -void EXTI4_IRQHandler(void); -void DMA1_Channel1_IRQHandler(void); -void DMA1_Channel2_IRQHandler(void); -void DMA1_Channel3_IRQHandler(void); -void DMA1_Channel4_IRQHandler(void); -void DMA1_Channel5_IRQHandler(void); -void DMA1_Channel6_IRQHandler(void); -void DMA1_Channel7_IRQHandler(void); -void ADC1_2_IRQHandler(void); -void USB_HP_CAN_TX_IRQHandler(void); -void USB_LP_CAN_RX0_IRQHandler(void); -void CAN_RX1_IRQHandler(void); -void CAN_SCE_IRQHandler(void); -void EXTI9_5_IRQHandler(void); -void TIM1_BRK_IRQHandler(void); -void TIM1_UP_IRQHandler(void); -void TIM1_TRG_COM_IRQHandler(void); -void TIM1_CC_IRQHandler(void); -void TIM2_IRQHandler(void); -void TIM3_IRQHandler(void); -void TIM4_IRQHandler(void); -void I2C1_EV_IRQHandler(void); -void I2C1_ER_IRQHandler(void); -void I2C2_EV_IRQHandler(void); -void I2C2_ER_IRQHandler(void); -void SPI1_IRQHandler(void); -void SPI2_IRQHandler(void); -void USART1_IRQHandler(void); -void USART2_IRQHandler(void); -void USART3_IRQHandler(void); -void EXTI15_10_IRQHandler(void); -void RTCAlarm_IRQHandler(void); -void USBWakeUp_IRQHandler(void); -void TIM8_BRK_IRQHandler(void); -void TIM8_UP_IRQHandler(void); -void TIM8_TRG_COM_IRQHandler(void); -void TIM8_CC_IRQHandler(void); -void ADC3_IRQHandler(void); -void FSMC_IRQHandler(void); -void SDIO_IRQHandler(void); -void TIM5_IRQHandler(void); -void SPI3_IRQHandler(void); -void UART4_IRQHandler(void); -void UART5_IRQHandler(void); -void TIM6_IRQHandler(void); -void TIM7_IRQHandler(void); -void DMA2_Channel1_IRQHandler(void); -void DMA2_Channel2_IRQHandler(void); -void DMA2_Channel3_IRQHandler(void); -void DMA2_Channel4_5_IRQHandler(void); - -#endif /* __STM32F10x_IT_H */ - -/******************* (C) COPYRIGHT 2008 STMicroelectronics *****END OF FILE****/ -- cgit v1.2.3