mirror of
https://github.com/MickGyver/DaemonBite-Retro-Controllers-USB
synced 2025-01-12 14:38:21 -05:00
Serial string added to CD32 controller adapter
This commit is contained in:
parent
0ee8aef8f0
commit
9284c06b74
@ -23,6 +23,10 @@
|
||||
|
||||
#include "Gamepad.h"
|
||||
|
||||
// ATT: 20 chars max (including NULL at the end) according to Arduino source code.
|
||||
// Additionally serial number is used to differentiate arduino projects to have different button maps!
|
||||
const char *gp_serial = "CD32/C= to USB";
|
||||
|
||||
#define BUTTON_READ_DELAY 300 // Button read delay in µs
|
||||
|
||||
// Controller DB9 pins (looking face-on to the end of the plug):
|
||||
|
@ -24,8 +24,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Gamepad.h"
|
||||
|
||||
static const uint8_t _hidReportDescriptor[] PROGMEM = {
|
||||
@ -146,5 +144,10 @@ void Gamepad_::send()
|
||||
|
||||
uint8_t Gamepad_::getShortName(char *name)
|
||||
{
|
||||
if(!next)
|
||||
{
|
||||
strcpy(name, gp_serial);
|
||||
return strlen(name);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -29,11 +29,7 @@
|
||||
#include <Arduino.h>
|
||||
#include "HID.h"
|
||||
|
||||
// NOTE: To make this work on the MiSTer (or possibly other Linux distros),
|
||||
// you need to edit USBDesc.h like follows. Change:
|
||||
// #define ISERIAL 3
|
||||
// to
|
||||
// #define ISERIAL 0
|
||||
extern const char* gp_serial;
|
||||
|
||||
// The numbers after colon are bit fields, meaning how many bits the field uses.
|
||||
// Remove those if there are problems
|
||||
|
Loading…
Reference in New Issue
Block a user