Moved usbd to separate library
parent
58e08dc0ad
commit
aaa60c6778
@ -1,41 +0,0 @@
|
||||
#ifndef USBD_DEVICE_H
|
||||
#define USBD_DEVICE_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "touch_controls_all.h"
|
||||
|
||||
class USBD_Device
|
||||
{
|
||||
private:
|
||||
// 0 - right bumper
|
||||
// 1 - left bumper
|
||||
// 2 - right trigger full
|
||||
// 3 - left trigger full
|
||||
// 4 - right trackpad
|
||||
// 5 - left trackpad
|
||||
// 6 - right front grip
|
||||
// 7 - right rear grip
|
||||
// 8 - left front grip
|
||||
// 9 - left rear grip
|
||||
uint16_t button_map[10];
|
||||
|
||||
// Trackpads
|
||||
// 0 - right, 1 - left
|
||||
TouchJoystick* tjoystick[2];
|
||||
TouchDpad* tdpad[2];
|
||||
|
||||
// TODO triggers
|
||||
|
||||
public:
|
||||
USBD_Device();
|
||||
|
||||
void begin();
|
||||
void end();
|
||||
|
||||
void addTouchJoystick(TouchJoystick* tjoystick);
|
||||
void addTouchDpad(TouchDpad* tdpad);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,20 @@
|
||||
#ifndef USB_DEVICE_H
|
||||
#define USB_DEVICE_H
|
||||
|
||||
#include <Arduino.h>
|
||||
|
||||
class USB_Device
|
||||
{
|
||||
private:
|
||||
|
||||
|
||||
public:
|
||||
USB_Device();
|
||||
|
||||
void begin();
|
||||
void end();
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "usb_device",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"keywords": "",
|
||||
"dependencies":
|
||||
{
|
||||
"hid_def" : "*"
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
#include "usb_device.h"
|
||||
|
||||
#include "usbd_hid_custom_if.h"
|
||||
|
||||
USB_Device::USB_Device(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void USB_Device::begin(void)
|
||||
{
|
||||
HID_Custom_Init();
|
||||
}
|
||||
|
||||
void USB_Device::end(void)
|
||||
{
|
||||
HID_Custom_DeInit();
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
#include "usbd_device.h"
|
||||
|
||||
#include "usbd_hid_custom_if.h"
|
||||
|
||||
const int16_t usb_x = 512;
|
||||
const int16_t usb_y = 512;
|
||||
const int16_t usb_r = 512;
|
||||
|
||||
USBD_Device::USBD_Device(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void USBD_Device::begin(void)
|
||||
{
|
||||
HID_Custom_Init();
|
||||
}
|
||||
|
||||
void USBD_Device::end(void)
|
||||
{
|
||||
HID_Custom_DeInit();
|
||||
}
|
Loading…
Reference in New Issue