Fork of Smoothie to port to mbed non-LPC targets.

Dependencies:   mbed

Fork of Smoothie by Stéphane Cachat

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers AK4183.h Source File

AK4183.h

00001 /*
00002  * AK4183.h
00003  *
00004  *  Created on: 21-06-2013
00005  *      Author: Wulfnor
00006  */
00007 
00008 #ifndef AK4183_H_
00009 #define AK4183_H_
00010 
00011 #include "libs/Kernel.h"
00012 #include "mbed.h"
00013 #include "libs/Pin.h"
00014 
00015 #define TS_ADDRESS 0x90
00016 
00017 class AK4183 {
00018 public:
00019     AK4183();
00020     virtual ~AK4183();
00021     int get_x();
00022     int get_y();
00023     bool pen_touching();
00024 private:
00025     Pin pen;
00026     mbed::I2C* i2c;
00027     char i2c_address;
00028     Pin penIRQ;
00029     unsigned char read_adc(unsigned char cmd);
00030     int read_x();
00031     int read_y();
00032 };
00033 
00034 #endif /* AK4183_H_ */