Sensorian  1.0
C API Reference Guide Library
main.c
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (C) 2015 Sensorian
3  * *
4  * This file is part of Sensorian. *
5  * *
6  * Sensorian is free software: you can redistribute it and/or modify it *
7  * under the terms of the GNU Lesser General Public License as published *
8  * by the Free Software Foundation, either version 3 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * Sensorian is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with Sensorian. *
18  * If not, see <http://www.gnu.org/licenses/>. *
19  ****************************************************************************/
20 
29 #include <bcm2835.h>
30 #include "CAP1203.h"
31 #include "Utilities.h"
32 #include "i2c.h"
33 
34 int main(int argc, char **argv)
35 {
38 
40 
41  while(1)
42  {
44  {
45  printf("Multitouch Event \r\n");
47  }
48  delay_ms(500);
49  }
50  I2C_Close();
51 
52  return 0;
53 }
54 
unsigned char CAP1203_MultitouchEvent(void)
Return true if a multitouch event was detected.
Definition: CAP1203.c:114
Definition: CAP1203.h:202
void I2C_Close(void)
Closes the I2C peripheral.
Definition: i2c.c:174
void CAP1203_Initialize(void)
Basic configuration for the capacitive touch controller. Configures the sensor inactive mode and acti...
Definition: CAP1203.c:41
#define CAP1203ADDR
The I2C address of the CAP1203 capacitive touch controller.
Definition: CAP1203.h:36
void I2C_Initialize(unsigned char address)
Initializes the I2C peripheral.
Definition: i2c.c:36
int main(int argc, char **argv)
Definition: main.c:34
void CAP1203_ConfigureMultiTouch(touch_type number, unsigned char mulchan)
Enables the multi-touch capability of the controller.
Definition: CAP1203.c:103
void delay_ms(unsigned int ms)
Delay in ms.
Definition: Utilities.c:39
CAP1203 driver header.
unsigned char CAP1203_ClearInterrupt(void)
Clears any impending interrupts.
Definition: CAP1203.c:232
#define CS1_PTRN
Definition: CAP1203.h:182
#define CS2_PTRN
Definition: CAP1203.h:181