|
STM8S/A Standard Peripherals Firmware Library
|
Data Structures | |
| struct | SC_ATR |
Defines | |
| #define | HIST_LENGHT 20 |
| #define | SC_Receive_Timeout 0x4000 |
| #define | SETUP_LENGHT 20 |
| #define | T0_PROTOCOL 0x00 |
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 } |
Functions | |
| void | GPIO_Config (void) |
| Configures the different GPIO ports. | |
| INTERRUPT_HANDLER (TLI_IRQHandler, 0) | |
| Top Level Interrupt routine. | |
| INTERRUPT_HANDLER (AWU_IRQHandler, 1) | |
| Auto Wake Up Interrupt routine. | |
| INTERRUPT_HANDLER (CLK_IRQHandler, 2) | |
| Clock Controller Interrupt routine. | |
| INTERRUPT_HANDLER (EXTI_PORTA_IRQHandler, 3) | |
| External Interrupt PORTA Interrupt routine. | |
| INTERRUPT_HANDLER (EXTI_PORTB_IRQHandler, 4) | |
| External Interrupt PORTB Interrupt routine. | |
| INTERRUPT_HANDLER (EXTI_PORTC_IRQHandler, 5) | |
| External Interrupt PORTC Interrupt routine. | |
| INTERRUPT_HANDLER (EXTI_PORTD_IRQHandler, 6) | |
| External Interrupt PORTD Interrupt routine. | |
| INTERRUPT_HANDLER (EXTI_PORTE_IRQHandler, 7) | |
| External Interrupt PORTE Interrupt routine. | |
| INTERRUPT_HANDLER (SPI_IRQHandler, 10) | |
| SPI Interrupt routine. | |
| INTERRUPT_HANDLER (TIM1_UPD_OVF_TRG_BRK_IRQHandler, 11) | |
| Timer1 Update/Overflow/Trigger/Break Interrupt routine. | |
| INTERRUPT_HANDLER (TIM1_CAP_COM_IRQHandler, 12) | |
| Timer1 Capture/Compare Interrupt routine. | |
| INTERRUPT_HANDLER (TIM2_UPD_OVF_BRK_IRQHandler, 13) | |
| Timer2 Update/Overflow/Break Interrupt routine. | |
| INTERRUPT_HANDLER (TIM2_CAP_COM_IRQHandler, 14) | |
| Timer2 Capture/Compare Interrupt routine. | |
| INTERRUPT_HANDLER (I2C_IRQHandler, 19) | |
| I2C Interrupt routine. | |
| INTERRUPT_HANDLER (ADC1_IRQHandler, 22) | |
| ADC1 interrupt routine. | |
| INTERRUPT_HANDLER (TIM4_UPD_OVF_IRQHandler, 23) | |
| Timer4 Update/Overflow Interrupt routine. | |
| INTERRUPT_HANDLER (EEPROM_EEC_IRQHandler, 24) | |
| Eeprom EEC Interrupt routine. | |
| INTERRUPT_HANDLER_TRAP (TRAP_IRQHandler) | |
| TRAP interrupt routine. | |
| void | main (void) |
| Main program. | |
| void | Multiplexer_EvalBoard_Config (void) |
| Configures the Multiplexer on the evalboard to select the smard card. | |
| uint8_t | SC_decode_Answer2reset (__IO uint8_t *card) |
| Decode the Card ATR Response. | |
Variables | |
| __IO TestStatus | ATRDecodeStatus = FAILED |
| __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 |
Define Documentation
| #define HIST_LENGHT 20 |
Definition at line 39 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by SC_decode_Answer2reset().
| #define SC_Receive_Timeout 0x4000 |
Definition at line 40 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main().
| #define SETUP_LENGHT 20 |
Definition at line 38 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by SC_decode_Answer2reset().
| #define T0_PROTOCOL 0x00 |
Definition at line 37 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
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
Definition at line 54 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Function Documentation
| void GPIO_Config | ( | void | ) |
Configures the different GPIO ports.
Configure GPIO for LEDs and buttons available on the evaluation board.
- Parameters:
-
None
- Return values:
-
None
Definition at line 191 of file STM8S_StdPeriph_Examples/CAN/CAN_Networking/main.c.
References BUTTON_KEY, BUTTON_MODE_EXTI, LED1, LED2, LED3, LED4, STM_EVAL_LEDInit(), STM_EVAL_LEDOff(), and STM_EVAL_PBInit().
| INTERRUPT_HANDLER | ( | TLI_IRQHandler | , |
| 0 | |||
| ) |
Top Level Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 73 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | AWU_IRQHandler | , |
| 1 | |||
| ) |
Auto Wake Up Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 85 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | CLK_IRQHandler | , |
| 2 | |||
| ) |
Clock Controller Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 97 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTA_IRQHandler | , |
| 3 | |||
| ) |
External Interrupt PORTA Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 109 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTB_IRQHandler | , |
| 4 | |||
| ) |
External Interrupt PORTB Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 121 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTC_IRQHandler | , |
| 5 | |||
| ) |
External Interrupt PORTC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 133 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTD_IRQHandler | , |
| 6 | |||
| ) |
External Interrupt PORTD Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 145 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTE_IRQHandler | , |
| 7 | |||
| ) |
External Interrupt PORTE Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 157 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | SPI_IRQHandler | , |
| 10 | |||
| ) |
SPI Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 208 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM1_UPD_OVF_TRG_BRK_IRQHandler | , |
| 11 | |||
| ) |
Timer1 Update/Overflow/Trigger/Break Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 220 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM1_CAP_COM_IRQHandler | , |
| 12 | |||
| ) |
Timer1 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 232 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM2_UPD_OVF_BRK_IRQHandler | , |
| 13 | |||
| ) |
Timer2 Update/Overflow/Break Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 269 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM2_CAP_COM_IRQHandler | , |
| 14 | |||
| ) |
Timer2 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 281 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | I2C_IRQHandler | , |
| 19 | |||
| ) |
I2C Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 349 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | ADC1_IRQHandler | , |
| 22 | |||
| ) |
ADC1 interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 427 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM4_UPD_OVF_IRQHandler | , |
| 23 | |||
| ) |
Timer4 Update/Overflow Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 454 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EEPROM_EEC_IRQHandler | , |
| 24 | |||
| ) |
Eeprom EEC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 467 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| INTERRUPT_HANDLER_TRAP | ( | TRAP_IRQHandler | ) |
TRAP interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 62 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/stm8s_it.c.
| void main | ( | void | ) |
Main program.
- Parameters:
-
None
- Return values:
-
None
Definition at line 78 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
References ATRDecodeStatus, CardProtocol, CLK_HSIPrescalerConfig(), CLK_PRESCALER_HSIDIV1, Counter, DST_Buffer, ENABLE, enableInterrupts, FAILED, GPIO_Config(), GPIO_PIN_5, GPIO_PIN_7, GPIO_ReadInputData(), GPIO_WriteHigh(), GPIO_WriteLow(), GPIOE, i, index, Multiplexer_EvalBoard_Config(), PASSED, RESET, SC_decode_Answer2reset(), SC_Receive_Timeout, UART1_DeInit(), UART1_FLAG_RXNE, UART1_GetFlagStatus(), UART1_Init(), UART1_IT_PE, UART1_ITConfig(), UART1_MODE_TXRX_ENABLE, UART1_PARITY_EVEN, UART1_ReceiveData8(), UART1_SetGuardTime(), UART1_SetPrescaler(), UART1_SmartCardCmd(), UART1_SmartCardNACKCmd(), UART1_STOPBITS_1_5, UART1_SYNCMODE_CLOCK_ENABLE, and UART1_WORDLENGTH_9D.
| void Multiplexer_EvalBoard_Config | ( | void | ) |
Configures the Multiplexer on the evalboard to select the smard card.
- Parameters:
-
None
- Return values:
-
None
Definition at line 280 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
References GPIO_Init(), GPIO_MODE_OUT_PP_HIGH_FAST, GPIO_MODE_OUT_PP_LOW_FAST, GPIO_PIN_5, GPIO_PIN_6, and GPIOF.
Referenced by main().
Decode the Card ATR Response.
- Parameters:
-
None
- Return values:
-
None
Definition at line 207 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
References SC_ATR::H, HIST_LENGHT, SC_ATR::Hlenght, i, SETUP_LENGHT, SC_ATR::T, SC_ATR::T0, SC_ATR::Tlenght, and SC_ATR::TS.
Referenced by main().
Variable Documentation
| __IO TestStatus ATRDecodeStatus = FAILED |
Definition at line 61 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main().
| __IO uint32_t CardInserted = 0 |
Definition at line 62 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
| __IO uint32_t CardProtocol = 1 |
Definition at line 62 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main().
Definition at line 60 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main(), and WWDG_Init().
| __IO uint8_t 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}
Definition at line 63 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main().
Definition at line 60 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.
Referenced by main().
Definition at line 59 of file STM8S_StdPeriph_Examples/UART1/UART1_SmartCard/main.c.