Skip to content

Remove gamepad, gamepadshift #4940

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/porting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ as a natural "TODO" list. An example minimal build list is shown below:
# any port once their prerequisites in common-hal are complete.
# Requires DigitalIO:
CIRCUITPY_BITBANGIO = 0
# Requires DigitalIO
CIRCUITPY_GAMEPAD = 0
# Requires neopixel_write or SPI (dotstar)
CIRCUITPY_PIXELBUF = 0
# Requires OS
Expand Down
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/8086_commander/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ"
LONGINT_IMPL = NONE
CIRCUITPY_FULL_BUILD = 0

CIRCUITPY_GAMEPAD = 1
CIRCUITPY_BUSDEVICE = 1
CIRCUITPY_KEYPAD = 1

# Include these Python libraries in firmware.
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
Expand Down
2 changes: 0 additions & 2 deletions ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ

CIRCUITPY_GAMEPADSHIFT = 1
2 changes: 0 additions & 2 deletions ports/atmel-samd/boards/pybadge/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q16C
LONGINT_IMPL = MPZ

CIRCUITPY_GAMEPAD = 1
CIRCUITPY_GAMEPADSHIFT = 1
CIRCUITPY_STAGE = 1

FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge
2 changes: 0 additions & 2 deletions ports/atmel-samd/boards/pygamer/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICES = GD25Q64C
LONGINT_IMPL = MPZ

CIRCUITPY_GAMEPAD = 1
CIRCUITPY_GAMEPADSHIFT = 1
CIRCUITPY_STAGE = 1

FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pygamer
2 changes: 1 addition & 1 deletion ports/atmel-samd/boards/ugame10/mpconfigboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ CIRCUITPY_STAGE = 1
CIRCUITPY_MATH = 1
CIRCUITPY_AUDIOIO = 1
CIRCUITPY_ANALOGIO = 1
CIRCUITPY_GAMEPAD = 1
CIRCUITPY_DISPLAYIO = 1
CIRCUITPY_KEYPAD = 1

CIRCUITPY_PULSEIO = 0
CIRCUITPY_AUDIOBUSIO = 0
Expand Down
1 change: 0 additions & 1 deletion ports/atmel-samd/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ CIRCUITPY_FRAMEBUFFERIO ?= 0
CIRCUITPY_FREQUENCYIO ?= 0
CIRCUITPY_I2CPERIPHERAL ?= 0
CIRCUITPY_JSON ?= 0
CIRCUITPY_KEYPAD ?= 0
CIRCUITPY_MSGPACK ?= 0
CIRCUITPY_RE ?= 0
CIRCUITPY_SDCARDIO ?= 0
Expand Down
12 changes: 0 additions & 12 deletions ports/atmel-samd/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@

#include "tusb.h"

#if CIRCUITPY_GAMEPAD
#include "shared-module/gamepad/__init__.h"
#endif
#if CIRCUITPY_GAMEPADSHIFT
#include "shared-module/gamepadshift/__init__.h"
#endif
#if CIRCUITPY_PEW
#include "common-hal/_pew/PewPew.h"
#endif
Expand Down Expand Up @@ -358,12 +352,6 @@ void reset_port(void) {

reset_gclks();

#if CIRCUITPY_GAMEPAD
gamepad_reset();
#endif
#if CIRCUITPY_GAMEPADSHIFT
gamepadshift_reset();
#endif
#if CIRCUITPY_PEW
pew_reset();
#endif
Expand Down
1 change: 0 additions & 1 deletion ports/cxd56/mpconfigport.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ CIRCUITPY_CAMERA = 1
CIRCUITPY_COUNTIO = 0
CIRCUITPY_DISPLAYIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_GAMEPAD = 0
CIRCUITPY_GNSS = 1
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
Expand Down
12 changes: 0 additions & 12 deletions ports/mimxrt10xx/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,6 @@

#include "tusb.h"

#if CIRCUITPY_GAMEPAD
#include "shared-module/gamepad/__init__.h"
#endif
#if CIRCUITPY_GAMEPADSHIFT
#include "shared-module/gamepadshift/__init__.h"
#endif
#if CIRCUITPY_PEW
#include "shared-module/_pew/PewPew.h"
#endif
Expand Down Expand Up @@ -300,12 +294,6 @@ void reset_port(void) {
rtc_reset();
#endif

#if CIRCUITPY_GAMEPAD
gamepad_reset();
#endif
#if CIRCUITPY_GAMEPADSHIFT
gamepadshift_reset();
#endif
#if CIRCUITPY_PEW
pew_reset();
#endif
Expand Down
5 changes: 0 additions & 5 deletions ports/nrf/supervisor/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "nrf/power.h"
#include "nrf/timers.h"

#include "shared-module/gamepad/__init__.h"
#include "common-hal/microcontroller/Pin.h"
#include "common-hal/_bleio/__init__.h"
#include "common-hal/analogio/AnalogIn.h"
Expand Down Expand Up @@ -207,10 +206,6 @@ safe_mode_t port_init(void) {
}

void reset_port(void) {
#ifdef CIRCUITPY_GAMEPAD_TICKS
gamepad_reset();
#endif

#if CIRCUITPY_BUSIO
i2c_reset();
spi_reset();
Expand Down
6 changes: 0 additions & 6 deletions py/circuitpy_defns.mk
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,6 @@ endif
ifeq ($(CIRCUITPY_FREQUENCYIO),1)
SRC_PATTERNS += frequencyio/%
endif
ifeq ($(CIRCUITPY_GAMEPAD),1)
SRC_PATTERNS += gamepad/%
endif
ifeq ($(CIRCUITPY_GAMEPADSHIFT),1)
SRC_PATTERNS += gamepadshift/%
endif
ifeq ($(CIRCUITPY_GNSS),1)
SRC_PATTERNS += gnss/%
endif
Expand Down
33 changes: 0 additions & 33 deletions py/circuitpy_mpconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -468,28 +468,6 @@ extern const struct _mp_obj_module_t frequencyio_module;
#define FREQUENCYIO_MODULE
#endif

#if CIRCUITPY_GAMEPAD
extern const struct _mp_obj_module_t gamepad_module;
#define GAMEPAD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module },
#else
#define GAMEPAD_MODULE
#endif

#if CIRCUITPY_GAMEPADSHIFT
extern const struct _mp_obj_module_t gamepadshift_module;
#define GAMEPADSHIFT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepadshift),(mp_obj_t)&gamepadshift_module },
#else
#define GAMEPADSHIFT_MODULE
#endif

#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT
// Scan gamepad every 32ms
#define CIRCUITPY_GAMEPAD_TICKS 0x1f
#define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton;
#else
#define GAMEPAD_ROOT_POINTERS
#endif

#if CIRCUITPY_GNSS
extern const struct _mp_obj_module_t gnss_module;
#define GNSS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gnss), (mp_obj_t)&gnss_module },
Expand Down Expand Up @@ -539,14 +517,6 @@ extern const struct _mp_obj_module_t keypad_module;
#define KEYPAD_ROOT_POINTERS
#endif

#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT
// Scan gamepad every 32ms
#define CIRCUITPY_GAMEPAD_TICKS 0x1f
#define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton;
#else
#define GAMEPAD_ROOT_POINTERS
#endif

#if CIRCUITPY_MATH
extern const struct _mp_obj_module_t math_module;
#define MATH_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_math), (mp_obj_t)&math_module },
Expand Down Expand Up @@ -904,8 +874,6 @@ extern const struct _mp_obj_module_t msgpack_module;
_EVE_MODULE \
FRAMEBUFFERIO_MODULE \
FREQUENCYIO_MODULE \
GAMEPAD_MODULE \
GAMEPADSHIFT_MODULE \
GNSS_MODULE \
I2CPERIPHERAL_MODULE \
IPADDRESS_MODULE \
Expand Down Expand Up @@ -979,7 +947,6 @@ struct _supervisor_allocation_node;
const char *readline_hist[8]; \
vstr_t *repl_line; \
mp_obj_t rtc_time_source; \
GAMEPAD_ROOT_POINTERS \
KEYPAD_ROOT_POINTERS \
mp_obj_t pew_singleton; \
BOARD_UART_ROOT_POINTER \
Expand Down
6 changes: 0 additions & 6 deletions py/circuitpy_mpconfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,6 @@ CFLAGS += -DCIRCUITPY__EVE=$(CIRCUITPY__EVE)
CIRCUITPY_FREQUENCYIO ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO)

CIRCUITPY_GAMEPAD ?= 0
CFLAGS += -DCIRCUITPY_GAMEPAD=$(CIRCUITPY_GAMEPAD)

CIRCUITPY_GAMEPADSHIFT ?= 0
CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT)

CIRCUITPY_GNSS ?= 0
CFLAGS += -DCIRCUITPY_GNSS=$(CIRCUITPY_GNSS)

Expand Down
166 changes: 0 additions & 166 deletions shared-bindings/gamepad/GamePad.c

This file was deleted.

Loading