Debounce digital inputs

r1387 | dcl | 2007-01-09 11:15:02 +1100 (Tue, 09 Jan 2007) | 2 lines
This commit is contained in:
Douglas Clowes
2007-01-09 11:15:02 +11:00
parent d45ba66ae1
commit 9ca1b3199a
2 changed files with 64 additions and 13 deletions

View File

@@ -28,12 +28,20 @@ typedef struct device_t
struct timeval current_time;
/** time of last read */
struct timeval previous_time;
/** time of next sample closure */
struct timeval sample_timer;
/** time of next report generation */
struct timeval report_timer;
/** number of polls */
int poll_counter;
/** output value */
unsigned int out_value;
/** physical device value */
unsigned int value;
/** tentative new value */
unsigned int new_value;
/** debounce counter */
int new_count;
/** Control parameters */
PARAMETERS params;
struct device_private_t* private_data;