Serial added to SEGA adapters
This commit is contained in:
parent
4863d43b47
commit
e7dcc5a735
|
@ -146,5 +146,10 @@ void Gamepad_::send()
|
||||||
|
|
||||||
uint8_t Gamepad_::getShortName(char *name)
|
uint8_t Gamepad_::getShortName(char *name)
|
||||||
{
|
{
|
||||||
|
if(!next)
|
||||||
|
{
|
||||||
|
strcpy(name, gp_serial);
|
||||||
|
return strlen(name);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "HID.h"
|
#include "HID.h"
|
||||||
|
|
||||||
|
extern const char* gp_serial;
|
||||||
|
|
||||||
// The numbers after colon are bit fields, meaning how many bits the field uses.
|
// The numbers after colon are bit fields, meaning how many bits the field uses.
|
||||||
// Remove those if there are problems
|
// Remove those if there are problems
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
#include "SegaController32U4.h"
|
#include "SegaController32U4.h"
|
||||||
#include "Gamepad.h"
|
#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 = "Sega/C= to USB";
|
||||||
|
|
||||||
// Controller DB9 pins (looking face-on to the end of the plug):
|
// Controller DB9 pins (looking face-on to the end of the plug):
|
||||||
//
|
//
|
||||||
// 5 4 3 2 1
|
// 5 4 3 2 1
|
||||||
|
|
|
@ -146,5 +146,10 @@ void Gamepad_::send()
|
||||||
|
|
||||||
uint8_t Gamepad_::getShortName(char *name)
|
uint8_t Gamepad_::getShortName(char *name)
|
||||||
{
|
{
|
||||||
|
if(!next)
|
||||||
|
{
|
||||||
|
strcpy(name, gp_serial);
|
||||||
|
return strlen(name);
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
#include "HID.h"
|
#include "HID.h"
|
||||||
|
|
||||||
|
extern const char* gp_serial;
|
||||||
|
|
||||||
// The numbers after colon are bit fields, meaning how many bits the field uses.
|
// The numbers after colon are bit fields, meaning how many bits the field uses.
|
||||||
// Remove those if there are problems
|
// Remove those if there are problems
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
#include "SegaControllers32U4.h"
|
#include "SegaControllers32U4.h"
|
||||||
#include "Gamepad.h"
|
#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 = "Sega/C= to USB";
|
||||||
|
|
||||||
// Controller DB9 pins (looking face-on to the end of the plug):
|
// Controller DB9 pins (looking face-on to the end of the plug):
|
||||||
//
|
//
|
||||||
// 5 4 3 2 1
|
// 5 4 3 2 1
|
||||||
|
|
Loading…
Reference in New Issue