Za liniju
Embed:
(wiki syntax)
Show/hide line numbers
joystick.h
00001 #ifndef JOYSTICK_H 00002 #define JOYSTICK_H 00003 #endif 00004 #ifndef MBED_H 00005 #include "mbed.h" 00006 #endif 00007 #ifndef GLOBAL_NAZIVI_H 00008 #include "global_nazivi.h" 00009 #endif 00010 00011 typedef enum { 00012 Gore=0,Dolje=1,Lijevo=2,Desno=3, Odabir=4, NijeOdabir = 5, 00013 } Kompas; 00014 00015 typedef struct { 00016 Kompas horizontala; 00017 Kompas vertikala; 00018 } JoysKompas; 00019 00020 class Joystick { 00021 public: 00022 Joystick(JoysKompas *Data); 00023 void YEnable(); 00024 void YDisable(); 00025 void YStatus(); 00026 void promjena(); 00027 private: 00028 AnalogIn _x; 00029 AnalogIn _y; 00030 Ticker y_ticker; 00031 JoysKompas *y_enable; 00032 };
Generated on Tue Jul 26 2022 17:28:06 by 1.7.2