Rev 489 | Rev 702 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 489 | Rev 679 | ||
---|---|---|---|
Line 60... | Line 60... | ||
60 | #include "main.h" |
60 | #include "main.h" |
61 | #include "led.h" |
61 | #include "led.h" |
Line 62... | Line 62... | ||
62 | 62 | ||
63 | u32 CountMilliseconds; |
63 | u32 CountMilliseconds; |
- | 64 | DateTime_t SystemTime; |
|
- | 65 | /* |
|
- | 66 | void CountInput(void) |
|
- | 67 | { |
|
- | 68 | static u8 p63 = 1, p64 = 0, p65 = 1; |
|
- | 69 | if(!PIN6_3) { if(p63) DebugOut.Analog[]++; p63 = 0; } else p63 = 1; |
|
- | 70 | if(!PIN6_4) { if(p64) DebugOut.Analog[]++; p64 = 0; } else p64 = 1; |
|
- | 71 | if(!PIN6_5) { if(p65) DebugOut.Analog[]++; p65 = 0; } else p65 = 1; |
|
- | 72 | } |
|
Line 64... | Line 73... | ||
64 | DateTime_t SystemTime; |
73 | */ |
65 | 74 | ||
66 | //---------------------------------------------------------------------------------------------------- |
75 | //---------------------------------------------------------------------------------------------------- |
67 | void TIM1_IRQHandler(void) |
76 | void TIM1_IRQHandler(void) |
Line 73... | Line 82... | ||
73 | TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
82 | TIM1->OC1R += 200; // Timerfreq is 200kHz, generate an interrupt every 1ms |
74 | CountMilliseconds++; |
83 | CountMilliseconds++; |
75 | if(SD_WatchDog) SD_WatchDog--; |
84 | if(SD_WatchDog) SD_WatchDog--; |
76 | if(SPIWatchDog) SPIWatchDog--; |
85 | if(SPIWatchDog) SPIWatchDog--; |
77 | if(PollingTimeout) PollingTimeout--; |
86 | if(PollingTimeout) PollingTimeout--; |
78 | 87 | //CountInput(); |
|
79 | // generate SW Interrupt to make a regular timing |
88 | // generate SW Interrupt to make a regular timing |
80 | // independent from the mainloop at the lowest IRQ priority |
89 | // independent from the mainloop at the lowest IRQ priority |
81 | VIC_SWITCmd(EXTIT3_ITLine, ENABLE); |
90 | VIC_SWITCmd(EXTIT3_ITLine, ENABLE); |
82 | } |
91 | } |
83 | // IDISABLE; |
92 | // IDISABLE; |