|
STM8S/A Standard Peripherals Firmware Library
|
Defines | |
| #define | TIM4_PERIOD 124 |
Functions | |
| static void | CLK_Config (void) |
| Configure system clock to run at 16Mhz. | |
| void | Delay (__IO uint32_t nTime) |
| Inserts a delay time. | |
| static void | GPIO_Config (void) |
| Configure GPIO for LEDs available on the evaluation board. | |
| 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. | |
| static void | TIM4_Config (void) |
| Configure TIM4 to generate an update interrupt each 1ms. | |
| void | TimingDelay_Decrement (void) |
| Decrements the TimingDelay variable. | |
Variables | |
| __IO uint32_t | TimingDelay = 0 |
Define Documentation
| #define TIM4_PERIOD 124 |
Definition at line 39 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/main.c.
Referenced by TIM4_Config().
Function Documentation
| static void CLK_Config | ( | void | ) | [static] |
Configure system clock to run at 16Mhz.
- Parameters:
-
None
- Return values:
-
None
| void Delay | ( | __IO uint32_t | nTime | ) |
Inserts a delay time.
- Parameters:
-
nTime,: specifies the delay time length, in milliseconds.
- Return values:
-
None
| static void GPIO_Config | ( | void | ) | [static] |
Configure GPIO for LEDs available on the evaluation board.
- Parameters:
-
None
- Return values:
-
None
| INTERRUPT_HANDLER | ( | TLI_IRQHandler | , |
| 0 | |||
| ) |
Top Level Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 74 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | AWU_IRQHandler | , |
| 1 | |||
| ) |
Auto Wake Up Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 86 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | CLK_IRQHandler | , |
| 2 | |||
| ) |
Clock Controller Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 98 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTA_IRQHandler | , |
| 3 | |||
| ) |
External Interrupt PORTA Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 110 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTB_IRQHandler | , |
| 4 | |||
| ) |
External Interrupt PORTB Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 122 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTC_IRQHandler | , |
| 5 | |||
| ) |
External Interrupt PORTC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 134 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTD_IRQHandler | , |
| 6 | |||
| ) |
External Interrupt PORTD Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 146 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | EXTI_PORTE_IRQHandler | , |
| 7 | |||
| ) |
External Interrupt PORTE Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 158 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | SPI_IRQHandler | , |
| 10 | |||
| ) |
SPI Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 209 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/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 221 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM1_CAP_COM_IRQHandler | , |
| 12 | |||
| ) |
Timer1 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 233 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/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 270 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM2_CAP_COM_IRQHandler | , |
| 14 | |||
| ) |
Timer2 Capture/Compare Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 282 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/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/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | ADC1_IRQHandler | , |
| 22 | |||
| ) |
ADC1 interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 429 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER | ( | TIM4_UPD_OVF_IRQHandler | , |
| 23 | |||
| ) |
Timer4 Update/Overflow Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 458 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
References TIM4_ClearITPendingBit(), TIM4_IT_UPDATE, and TimingDelay_Decrement().
| INTERRUPT_HANDLER | ( | EEPROM_EEC_IRQHandler | , |
| 24 | |||
| ) |
Eeprom EEC Interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 472 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| INTERRUPT_HANDLER_TRAP | ( | TRAP_IRQHandler | ) |
TRAP interrupt routine.
- Parameters:
-
None
- Return values:
-
None
Definition at line 63 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/stm8s_it.c.
| void main | ( | void | ) |
Main program.
- Parameters:
-
None
- Return values:
-
None
Definition at line 56 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/main.c.
References CLK_Config(), Delay(), GPIO_Config(), LED1, LED2, LED3, LED4, STM_EVAL_LEDToggle(), and TIM4_Config().
| static void TIM4_Config | ( | void | ) | [static] |
Configure TIM4 to generate an update interrupt each 1ms.
- Parameters:
-
None
- Return values:
-
None
Definition at line 103 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/main.c.
References ENABLE, enableInterrupts, TIM4_ClearFlag(), TIM4_Cmd(), TIM4_FLAG_UPDATE, TIM4_IT_UPDATE, TIM4_ITConfig(), TIM4_PERIOD, TIM4_PRESCALER_128, and TIM4_TimeBaseInit().
Referenced by main().
| void TimingDelay_Decrement | ( | void | ) |
Decrements the TimingDelay variable.
- Parameters:
-
None
- Return values:
-
None
Definition at line 168 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/main.c.
References TimingDelay.
Referenced by INTERRUPT_HANDLER().
Variable Documentation
| __IO uint32_t TimingDelay = 0 |
Definition at line 42 of file STM8S_StdPeriph_Examples/TIM4/TIM4_TimeBase/main.c.
Referenced by TimingDelay_Decrement().