Subversion Repositories HomeAutomation

Rev

Rev 1286 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1286 Rev 1297
Line 13... Line 13...
13
#include <bios.h>
13
#include <bios.h>
14
#include <drivers/can/stdcan.h>
14
#include <drivers/can/stdcan.h>
15
#include <drivers/timer/timer.h>
15
#include <drivers/timer/timer.h>
16
#include <drivers/mcu/gpio.h>
16
#include <drivers/mcu/gpio.h>
17
#include <drivers/adc/adc.h>
17
#include <drivers/adc/adc.h>
-
 
18
#include <drivers/touch/gesture/gesture.h>
18
 
19
 
19
//to use PCINT lib. uncomment the line below
20
//to use PCINT lib. uncomment the line below
20
//#include <drivers/mcu/pcint.h>
21
//#include <drivers/mcu/pcint.h>
21
 
22
 
22
void sns_Touch_Init(void);
23
void sns_Touch_Init(void);
23
void sns_Touch_Process(void);
24
void sns_Touch_Process(void);
24
void sns_Touch_HandleMessage(StdCan_Msg_t *rxMsg);
25
void sns_Touch_HandleMessage(StdCan_Msg_t *rxMsg);
25
void sns_Touch_List(uint8_t ModuleSequenceNumber);
26
void sns_Touch_List(uint8_t ModuleSequenceNumber);
26
 
-
 
27
typedef struct
-
 
28
{
-
 
29
    uint8_t x;
-
 
30
    uint8_t y;
-
 
31
} point;
-
 
32
 
-
 
33
typedef struct
-
 
34
{
-
 
35
    uint8_t f1;
-
 
36
    uint8_t f2;
-
 
37
    uint8_t f3;
-
 
38
    uint8_t f4;
-
 
39
    uint8_t f5;
-
 
40
    uint8_t f6;
-
 
41
    uint8_t f7;
-
 
42
    uint8_t f8;
-
 
43
    uint8_t f9;
-
 
44
} gesture;
-
 
45
 
-
 
46
static __inline__ uint8_t min(uint8_t val1, uint8_t val2) {
-
 
47
  if (val1 > val2)
-
 
48
  {
-
 
49
    return val2;
-
 
50
  }
-
 
51
  return val1;
-
 
52
}
-
 
53
 
-
 
54
static __inline__ uint8_t max(uint8_t val1, uint8_t val2) {
-
 
55
  if (val1 > val2)
-
 
56
  {
-
 
57
    return val1;
-
 
58
  }
-
 
59
  return val2;
-
 
60
}
-
 
61
 
27
 
62
#ifdef sns_Touch_USEEEPROM
28
#ifdef sns_Touch_USEEEPROM
63
    struct sns_Touch_Data{
29
    struct sns_Touch_Data{
64
        ///TODO: Define EEPROM variables needed by the module
30
        ///TODO: Define EEPROM variables needed by the module
65
        uint8_t x;
31
        uint8_t x;