You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
733 B
C++
40 lines
733 B
C++
#ifndef INPUT_MAPPER_H
|
|
#define INPUT_MAPPER_H
|
|
|
|
#include "stdint.h"
|
|
|
|
namespace InputMapper
|
|
{
|
|
void begin();
|
|
|
|
void mapTrackpad(uint8_t id, uint8_t fid, int32_t x, int32_t y, int32_t dx, int32_t dy, uint32_t time);
|
|
|
|
void update(uint32_t time);
|
|
|
|
void mapTriggers(uint32_t value[2]);
|
|
|
|
enum HardwareButtons: uint8_t
|
|
{
|
|
START,
|
|
SELECT,
|
|
TRACKPAD_LEFT,
|
|
TRACKPAD_RIGHT,
|
|
BUMPER_LEFT,
|
|
BUMPER_RIGHT,
|
|
HOME,
|
|
GRIP_A,
|
|
GRIP_B,
|
|
GRIP_X,
|
|
GRIP_Y,
|
|
};
|
|
|
|
extern uint16_t button_map[];
|
|
|
|
void mapButton(HardwareButtons button, bool value);
|
|
|
|
// void mapGyro();
|
|
|
|
void sendReport();
|
|
}
|
|
|
|
#endif |