#include "config.h"#include "ATA6824_defs.h"#include "Timer0_PWM.h"Include dependency graph for ATA6824_defs.c:

Go to the source code of this file.
Functions | |
| void | refresh_ATA6824_watchdog (void) |
| refresh_watchdog Refreshes the ATA6824 external watchdog according to its required refresh period (fixed by an external resistor). | |
| void | Diag_inputs_ISR_init (void) |
Diag_inputs_ISR_init set-up Pin change interrupts on diagnotics inputs
| |
Variables | |
| ATA6824_diag_mgt_t | ATA6824_diag_mgt |
| void refresh_ATA6824_watchdog | ( | void | ) |
refresh_watchdog Refreshes the ATA6824 external watchdog according to its required refresh period (fixed by an external resistor).
This routine uses the software time base to generate rising edges on the WD trigger pin of the ATA6824 during the open window t2 (see datasheet).
Definition at line 56 of file ATA6824_defs.c.
References SoftTimer_t::count, ONE_SECOND, time_count_1s, and WD_TIME_TRIG.
Referenced by main().
00057 { 00058 static unsigned int last_count=0; // remembers the last WD trigger instant 00059 signed int dif; 00060 00061 // Compute elapsed time since the last WD trigger has occured 00062 dif = last_count - (U16)(time_count_1s.count); 00063 00064 if (dif<0) 00065 {dif = dif + ONE_SECOND; }; // take care of time count overflows 00066 00067 // Check the elapsed time since the last WD trigger 00068 if (dif > WD_TIME_TRIG) 00069 { 00070 // Toggle the Watchdog trigger pin when half of the period has elapsed 00071 TOGGLE_WD_TRIG(); 00072 last_count = time_count_1s.count; // remember the last WD trigger instant 00073 } 00074 }
| void Diag_inputs_ISR_init | ( | void | ) |
Diag_inputs_ISR_init set-up Pin change interrupts on diagnotics inputs
Definition at line 83 of file ATA6824_defs.c.
Referenced by main().
00084 { 00085 /*init PCINT1 Pin change interrupt initialisation */ 00086 // PCINT14...8 interrupt pins enabled 00087 PCICR |= 1 << PCIE1; 00088 // PCINT10/11/12 interrupt pin are enabled 00089 PCMSK1 |= (1 << PCINT12) | (1 << PCINT11) | (1 << PCINT10); 00090 }
1.4.7