fork/GramFirmware

git clone https://git.julia.blue/fork/GramFirmware

CarVacrebase to configurator818d962

gram
379 B18 linesraw
1#include "comms/console_detection.hpp"
2
3#include "comms/DInputBackend.hpp"
4#include "core/pinout.hpp"
5#include "stdlib.hpp"
6
7#include <config.pb.h>
8
9CommunicationBackendId detect_console(const Pinout &pinout) {
10    delay(500);
11    bool usb_connected = UDADDR & _BV(ADDEN);
12
13    if (usb_connected) {
14        return COMMS_BACKEND_DINPUT;
15    }
16
17    return COMMS_BACKEND_GAMECUBE;
18}