-
Notifications
You must be signed in to change notification settings - Fork 0
/
PR_debounce.h
49 lines (38 loc) · 2.52 KB
/
PR_debounce.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* debounce.h
*
* Created on: Jul 4, 2017
* Author: USER
*/
#ifndef PRIMITIVAS_PR_DEBOUNCE_H_
#define PRIMITIVAS_PR_DEBOUNCE_H_
#include "DR_tipos.h"
/***********************************************************************************************************************************
*** MODULO
**********************************************************************************************************************************/
/***********************************************************************************************************************************
*** INCLUDES GLOBALES
**********************************************************************************************************************************/
/***********************************************************************************************************************************
*** DEFINES GLOBALES
**********************************************************************************************************************************/
#define SENSOR_PAPEL_DEBOUNCED (BufferEntradas & 1)
#define SENSOR_FIN_CARRO_DEBOUNCED ((BufferEntradas >> 1) & 1)
#define E1 ((BufferEntradas >> 2) & 1)
#define E2 ((BufferEntradas >> 3) & 1)
#define E3 ((BufferEntradas >> 4) & 1)
/***********************************************************************************************************************************
*** MACROS GLOBALES
**********************************************************************************************************************************/
/***********************************************************************************************************************************
*** TIPO DE DATOS GLOBALES
**********************************************************************************************************************************/
/***********************************************************************************************************************************
*** VARIABLES GLOBALES
**********************************************************************************************************************************/
extern __RW uint8_t BufferEntradas;
/***********************************************************************************************************************************
*** PROTOTIPOS DE FUNCIONES GLOBALES
**********************************************************************************************************************************/
void Debounce(void);
#endif /* PRIMITIVAS_PR_DEBOUNCE_H_ */