32#include "tutti_gli_header.h"
37volatile bool timer = 0;
38volatile uint32_t ticks = 0;
39volatile uint32_t N = 100;
54#define come_dovrebbe_funzionare
56#ifdef come_dovrebbe_funzionare
64 int32_t partenza,arrivo ;
65 millisecondi = millisecondi * TIMER0_coefficiente_per_millisec ;
66 LPC_TIM0->MR0 = millisecondi ;
68 TIMER0_start_conteggio
69 while( (LPC_TIM0->IR & 1) ==0 ){}
104 if( prolungamento==0){
145 LPC_SC->PCLKSEL0 |= 1 << 2;
146 LPC_TIM0->PR = SystemCoreClock / TIMER0_freqeunza ;
160 LPC_SC->PCLKSEL0 |= 1 << 4;
161 LPC_TIM1->PR = SystemCoreClock / TIMER0_freqeunza ;
163 TIMER1_start_conteggio
void LED_accendi_spegni(uint8_t LED, uint8_t accendi_1_spegni_0)
This function turns ON or OFF any of the selcted LED.
volatile uint8_t LED_rosso_attivo
void LED_VERDE_lampeggio(void)
This function toggles the green LED and it is launched by SysTick_Handler() every time LED_verde_temp...
volatile uint16_t LED_verde_fondo_scala
volatile uint16_t LED_rosso_fondo_scala
volatile uint8_t LED_verde_attivo
void LED_RED_lampeggio(void)
This function toggles the Red LED and it is launched by SysTick_Handler() every time LED_rosso_tempo ...
volatile uint32_t POWER_DOWN_ABILITA_CONTEGGIO
Power down couter and anable is set if this variable is true.
volatile uint32_t POWER_DOWN_TEMPO_ATTESA
Counter to wait for power down, multiple of 10 ms.
void Aspetta_tanti_ms(int millisecondi)
The timing function.
void TIMER1_setup(void)
Use of timer0 as an endless counter.
void TIMER0_setup(void)
Use of timer0 as a delay.
void SysTick_Handler(void)
The timing function.
#define TIM0_MR0I
Abilitazione interrupt timer0.
#define TIM0_MR0R
Reset contatori timer0.
#define TIM0_MR0S
Stop al fondo scala timer0.