upm/examples/c/ttp223.c
Noel Eck ccb9fa2a4f doc: Updated spelling occured -> occurred
Fixed small typo.

Signed-off-by: Noel Eck <noel.eck@intel.com>
2017-03-20 14:26:50 -07:00

26 lines
494 B
C

//Modified: Abhishek Malik <abhishek.malik@intel.com>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "ttp223.h"
#include "upm_utilities.h"
int main()
{
ttp223_context dev = ttp223_init(2);
bool abc = 0;
while(1){
if(ttp223_is_pressed(dev, &abc) != UPM_SUCCESS){
printf("an error has occurred\n");
}
upm_delay(1);
printf("value retrieved: %d\n", abc);
}
return 0;
}