
The final project of Embedde class.
Dependencies: C12832 LM75B ESP-call MMA7660
Diff: JOYSTICK/JOYSTICK.h
- Revision:
- 1:ed1c6618f739
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/JOYSTICK/JOYSTICK.h Thu Jun 03 07:08:47 2021 +0000 @@ -0,0 +1,26 @@ +#ifndef _JOY_H +#define _JOY_H + +#include "mbed.h" +#include "BUZZER.h" + +#define JOYSTICK_DEBOUNCING_DELAY 10 +#define JOYSTICK_BEEP_DELAY 50 +#define JOYSTICK_BEEP_CNT 1 + +extern InterruptIn joystickU; +extern InterruptIn joystickD; +extern InterruptIn joystickL; +extern InterruptIn joystickR; +extern InterruptIn joystickC; + +#define JOYSTICK_U 0 +#define JOYSTICK_D 1 +#define JOYSTICK_L 2 +#define JOYSTICK_R 3 +#define JOYSTICK_C 4 + +void joystickInit(void); +int joystickDir(void); + +#endif \ No newline at end of file