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.
opentrackpadcontroller/include/input_mapper.h

38 lines
707 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,
BUMPER_LEFT,
BUMPER_RIGHT,
HOME,
GRIP_A,
GRIP_B,
GRIP_X,
GRIP_Y,
TRACKPAD_LEFT,
TRACKPAD_RIGHT,
};
extern uint16_t button_map[];
bool mapButton(HardwareButtons button, bool value);
void sendReport();
}
#endif