Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Gamepad.h
- Committer:
- eencae
- Date:
- 2017-02-04
- Revision:
- 0:a6288c29b936
- Child:
- 1:6d25cd49059b
File content as of revision 0:a6288c29b936:
#ifndef GAMEPAD_H
#define GAMEPAD_H
#include "mbed.h"
#include "N5110.h"
#include "Joystick.h"
class Gamepad
{
public:
Gamepad();
N5110 *lcd;
Joystick *joystick;
void init();
void leds_on();
void leds_off();
private:
PwmOut *led_1;
PwmOut *led_2;
PwmOut *led_3;
PwmOut *led_4;
PwmOut *led_5;
PwmOut *led_6;
InterruptIn *button_A(PTB9);
InterruptIn *button_B(D10);
InterruptIn *button_X(PTC17);
InterruptIn *button_Y(PTC12); // changed pin
InterruptIn *button_back(PTB19);
InterruptIn *button_start(PTC5);
InterruptIn *button_L(PTB18);
InterruptIn *button_R(PTB3);
PwmOut *buzzer(PTC10);
AnalogIn *pot(PTB2);
};
#endif