Emiel Estiévenart
/
QT1070_copy
Schoolproject, Emulates a QT1070 from a touchberry
Diff: I2C_QT1070.h
- Revision:
- 1:f4caacc4df1b
- Parent:
- 0:b7b55b8a4d2b
--- a/I2C_QT1070.h Thu Nov 10 13:28:23 2016 +0000 +++ b/I2C_QT1070.h Fri Nov 11 11:57:40 2016 +0000 @@ -5,32 +5,25 @@ namespace QT1070touchemulator { -enum Qt1070Register { - CHIP_ID = 0, - FIRMWARE = 1, - KEY_STATUS = 3, - RESET = 57 -}; - -class I2cQT1070 : public I2CSlave -{ - + enum Qt1070Register { + CHIP_ID = 0, + FIRMWARE = 1, + KEY_STATUS = 3, + RESET = 57 + }; -public: - I2cQT1070(PinName sda, PinName scl, int address=0xDE, int frequentie = 100); - void check_for_instruction(void); - void save_register_adress(void); -private: - QT1070 Qt1070Chip; - int registerAdress; - int read_data(void); - void send_data_to_master(void); - void process_instruction(void); - - - -}; - - - + class I2cQT1070 : public I2CSlave + { + public: + I2cQT1070(PinName sda, PinName scl, int address=0xDE, int frequentie = 100); + void check_for_instruction(void); + void save_register_adress(void); + + private: + QT1070 Qt1070Chip; + int registerAdress; + int read_data(void); + void send_data_to_master(void); + void process_instruction(void); + }; }; \ No newline at end of file