CROSS Technical Documentation User Manual and Technical Doc.
INFN Milano Bicocca
Loading...
Searching...
No Matches

◆ SysTick_Handler()

void SysTick_Handler ( void  )

The timing function.

Parameters
[in]mthe time to wait in millisec
Returns
No Parameters
85void SysTick_Handler (void)
86{ // Se il flag timer \'e 0, non viene fatto niente
87 if (timer == 1) // Se il flag timer \'e 1, viene aumentato ticks finch\'e non diventa N-1
88 {
89 if(ticks>=(N-1))
90 {
91 ticks=0; // Quando ticks = N-1, vengono azzerati ticks e timer
92 timer=0;
93// return;
94 }
95 else
96 {
97 ++ticks;
98// return;
99 }
100 }
101#ifdef true
102 //temporizzatore LED rosso
103 if (LED_rosso_attivo || prolungamento){
104 if( prolungamento==0){
105 prolungamento=10;
106 LED_rosso_tempo=0;
108 acceso=0;
109 }
110 if( (LED_rosso_tempo >= LED_rosso_fondo_scala) ){
111 LED_rosso_tempo =0;
113 prolungamento--;
114 if(prolungamento==0)LED_accendi_spegni(LED_RED, spegni);
115 }else{
116 LED_rosso_tempo++;
117 }
118 }
119
120//temporizzatore LED verde
122 if( (LED_verde_tempo >= LED_verde_fondo_scala) ){
123 LED_verde_tempo =0;
125 }else{
126 LED_verde_tempo++;
127 }
128 }
129#endif
130 //temporizzazione powerdown
132
133}
void LED_accendi_spegni(uint8_t LED, uint8_t accendi_1_spegni_0)
This function turns ON or OFF any of the selcted LED.
Definition: Led.c:123
volatile uint8_t LED_rosso_attivo
Definition: Led.c:57
void LED_VERDE_lampeggio(void)
This function toggles the green LED and it is launched by SysTick_Handler() every time LED_verde_temp...
Definition: Led.c:100
volatile uint16_t LED_verde_fondo_scala
Definition: Led.c:63
volatile uint16_t LED_rosso_fondo_scala
Definition: Led.c:56
volatile uint8_t LED_verde_attivo
Definition: Led.c:61
void LED_RED_lampeggio(void)
This function toggles the Red LED and it is launched by SysTick_Handler() every time LED_rosso_tempo ...
Definition: Led.c:77
#define LED_RED
Definition: Led.h:10
#define spegni
Definition: Led.h:13
#define accendi
Definition: Led.h:12
volatile uint32_t POWER_DOWN_ABILITA_CONTEGGIO
Power down couter and anable is set if this variable is true.
Definition: Power_down.c:120
volatile uint32_t POWER_DOWN_TEMPO_ATTESA
Counter to wait for power down, multiple of 10 ms.
Definition: Power_down.c:116
void SysTick_Handler(void)
The timing function.
Definition: Timer.c:85

Definition at line 85 of file Timer.c.