Skip to content

Commit 2d198b6

Browse files
committed
Remove gamepad, gamepadshift
These are effectively replaced by the new keypad module, which is reenabled on select boards as well as when CIRCUITPY_FULL_BUILD is specified and it is not specifically disabled.
1 parent ae50809 commit 2d198b6

File tree

32 files changed

+3
-1012
lines changed

32 files changed

+3
-1012
lines changed

docs/porting.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ as a natural "TODO" list. An example minimal build list is shown below:
7979
# any port once their prerequisites in common-hal are complete.
8080
# Requires DigitalIO:
8181
CIRCUITPY_BITBANGIO = 0
82-
# Requires DigitalIO
83-
CIRCUITPY_GAMEPAD = 0
8482
# Requires neopixel_write or SPI (dotstar)
8583
CIRCUITPY_PIXELBUF = 0
8684
# Requires OS

ports/atmel-samd/boards/8086_commander/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ"
1212
LONGINT_IMPL = NONE
1313
CIRCUITPY_FULL_BUILD = 0
1414

15-
CIRCUITPY_GAMEPAD = 1
1615
CIRCUITPY_BUSDEVICE = 1
16+
CIRCUITPY_KEYPAD = 1
1717

1818
# Include these Python libraries in firmware.
1919
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID

ports/atmel-samd/boards/openbook_m4/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,3 @@ CHIP_FAMILY = samd51
99
QSPI_FLASH_FILESYSTEM = 1
1010
EXTERNAL_FLASH_DEVICES = GD25Q16C
1111
LONGINT_IMPL = MPZ
12-
13-
CIRCUITPY_GAMEPADSHIFT = 1

ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CIRCUITPY_AUDIOMP3 = 0
1616
CIRCUITPY_BITBANGIO = 0
1717
CIRCUITPY_BITBANG_APA102 = 0
1818
CIRCUITPY_FREQUENCYIO = 0
19-
CIRCUITPY_GAMEPADSHIFT = 0
2019
CIRCUITPY_I2CPERIPHERAL = 0
2120
CIRCUITPY_NEOPIXEL_WRITE = 0
2221
CIRCUITPY_PIXELBUF = 0
@@ -35,7 +34,7 @@ CIRCUITPY_ANALOGIO = 1
3534
CIRCUITPY_AUDIOMIXER = 1
3635
CIRCUITPY_AUDIOIO = 1
3736
CIRCUITPY_DISPLAYIO = 1
38-
CIRCUITPY_GAMEPAD = 1
37+
CIRCUITPY_KEYPAD = 1
3938
CIRCUITPY_MATH = 1
4039
CIRCUITPY_STAGE = 1
4140

ports/atmel-samd/boards/pybadge/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
1010
EXTERNAL_FLASH_DEVICES = GD25Q16C
1111
LONGINT_IMPL = MPZ
1212

13-
CIRCUITPY_GAMEPAD = 1
14-
CIRCUITPY_GAMEPADSHIFT = 1
1513
CIRCUITPY_STAGE = 1
1614

1715
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pybadge

ports/atmel-samd/boards/pygamer/mpconfigboard.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ QSPI_FLASH_FILESYSTEM = 1
1010
EXTERNAL_FLASH_DEVICES = GD25Q64C
1111
LONGINT_IMPL = MPZ
1212

13-
CIRCUITPY_GAMEPAD = 1
14-
CIRCUITPY_GAMEPADSHIFT = 1
1513
CIRCUITPY_STAGE = 1
1614

1715
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/pygamer

ports/atmel-samd/boards/ugame10/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ CIRCUITPY_STAGE = 1
1414
CIRCUITPY_MATH = 1
1515
CIRCUITPY_AUDIOIO = 1
1616
CIRCUITPY_ANALOGIO = 1
17-
CIRCUITPY_GAMEPAD = 1
1817
CIRCUITPY_DISPLAYIO = 1
18+
CIRCUITPY_KEYPAD = 1
1919

2020
CIRCUITPY_PULSEIO = 0
2121
CIRCUITPY_AUDIOBUSIO = 0

ports/atmel-samd/mpconfigport.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ CIRCUITPY_FRAMEBUFFERIO ?= 0
5050
CIRCUITPY_FREQUENCYIO ?= 0
5151
CIRCUITPY_I2CPERIPHERAL ?= 0
5252
CIRCUITPY_JSON ?= 0
53-
CIRCUITPY_KEYPAD ?= 0
5453
CIRCUITPY_MSGPACK ?= 0
5554
CIRCUITPY_RE ?= 0
5655
CIRCUITPY_SDCARDIO ?= 0

ports/atmel-samd/supervisor/port.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,6 @@
8585

8686
#include "tusb.h"
8787

88-
#if CIRCUITPY_GAMEPAD
89-
#include "shared-module/gamepad/__init__.h"
90-
#endif
91-
#if CIRCUITPY_GAMEPADSHIFT
92-
#include "shared-module/gamepadshift/__init__.h"
93-
#endif
9488
#if CIRCUITPY_PEW
9589
#include "common-hal/_pew/PewPew.h"
9690
#endif
@@ -358,12 +352,6 @@ void reset_port(void) {
358352

359353
reset_gclks();
360354

361-
#if CIRCUITPY_GAMEPAD
362-
gamepad_reset();
363-
#endif
364-
#if CIRCUITPY_GAMEPADSHIFT
365-
gamepadshift_reset();
366-
#endif
367355
#if CIRCUITPY_PEW
368356
pew_reset();
369357
#endif

ports/cxd56/mpconfigport.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ CIRCUITPY_CAMERA = 1
1717
CIRCUITPY_COUNTIO = 0
1818
CIRCUITPY_DISPLAYIO = 0
1919
CIRCUITPY_FREQUENCYIO = 0
20-
CIRCUITPY_GAMEPAD = 0
2120
CIRCUITPY_GNSS = 1
2221
CIRCUITPY_I2CPERIPHERAL = 0
2322
CIRCUITPY_NEOPIXEL_WRITE = 0

ports/mimxrt10xx/supervisor/port.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@
4747

4848
#include "tusb.h"
4949

50-
#if CIRCUITPY_GAMEPAD
51-
#include "shared-module/gamepad/__init__.h"
52-
#endif
53-
#if CIRCUITPY_GAMEPADSHIFT
54-
#include "shared-module/gamepadshift/__init__.h"
55-
#endif
5650
#if CIRCUITPY_PEW
5751
#include "shared-module/_pew/PewPew.h"
5852
#endif
@@ -300,12 +294,6 @@ void reset_port(void) {
300294
rtc_reset();
301295
#endif
302296

303-
#if CIRCUITPY_GAMEPAD
304-
gamepad_reset();
305-
#endif
306-
#if CIRCUITPY_GAMEPADSHIFT
307-
gamepadshift_reset();
308-
#endif
309297
#if CIRCUITPY_PEW
310298
pew_reset();
311299
#endif

ports/nrf/supervisor/port.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
#include "nrf/power.h"
4040
#include "nrf/timers.h"
4141

42-
#include "shared-module/gamepad/__init__.h"
4342
#include "common-hal/microcontroller/Pin.h"
4443
#include "common-hal/_bleio/__init__.h"
4544
#include "common-hal/analogio/AnalogIn.h"
@@ -211,10 +210,6 @@ safe_mode_t port_init(void) {
211210
}
212211

213212
void reset_port(void) {
214-
#ifdef CIRCUITPY_GAMEPAD_TICKS
215-
gamepad_reset();
216-
#endif
217-
218213
#if CIRCUITPY_BUSIO
219214
i2c_reset();
220215
spi_reset();

py/circuitpy_defns.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ endif
184184
ifeq ($(CIRCUITPY_FREQUENCYIO),1)
185185
SRC_PATTERNS += frequencyio/%
186186
endif
187-
ifeq ($(CIRCUITPY_GAMEPAD),1)
188-
SRC_PATTERNS += gamepad/%
189-
endif
190-
ifeq ($(CIRCUITPY_GAMEPADSHIFT),1)
191-
SRC_PATTERNS += gamepadshift/%
192-
endif
193187
ifeq ($(CIRCUITPY_GNSS),1)
194188
SRC_PATTERNS += gnss/%
195189
endif

py/circuitpy_mpconfig.h

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -468,28 +468,6 @@ extern const struct _mp_obj_module_t frequencyio_module;
468468
#define FREQUENCYIO_MODULE
469469
#endif
470470

471-
#if CIRCUITPY_GAMEPAD
472-
extern const struct _mp_obj_module_t gamepad_module;
473-
#define GAMEPAD_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepad),(mp_obj_t)&gamepad_module },
474-
#else
475-
#define GAMEPAD_MODULE
476-
#endif
477-
478-
#if CIRCUITPY_GAMEPADSHIFT
479-
extern const struct _mp_obj_module_t gamepadshift_module;
480-
#define GAMEPADSHIFT_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gamepadshift),(mp_obj_t)&gamepadshift_module },
481-
#else
482-
#define GAMEPADSHIFT_MODULE
483-
#endif
484-
485-
#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT
486-
// Scan gamepad every 32ms
487-
#define CIRCUITPY_GAMEPAD_TICKS 0x1f
488-
#define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton;
489-
#else
490-
#define GAMEPAD_ROOT_POINTERS
491-
#endif
492-
493471
#if CIRCUITPY_GNSS
494472
extern const struct _mp_obj_module_t gnss_module;
495473
#define GNSS_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_gnss), (mp_obj_t)&gnss_module },
@@ -539,14 +517,6 @@ extern const struct _mp_obj_module_t keypad_module;
539517
#define KEYPAD_ROOT_POINTERS
540518
#endif
541519

542-
#if CIRCUITPY_GAMEPAD || CIRCUITPY_GAMEPADSHIFT
543-
// Scan gamepad every 32ms
544-
#define CIRCUITPY_GAMEPAD_TICKS 0x1f
545-
#define GAMEPAD_ROOT_POINTERS mp_obj_t gamepad_singleton;
546-
#else
547-
#define GAMEPAD_ROOT_POINTERS
548-
#endif
549-
550520
#if CIRCUITPY_MATH
551521
extern const struct _mp_obj_module_t math_module;
552522
#define MATH_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_math), (mp_obj_t)&math_module },
@@ -897,8 +867,6 @@ extern const struct _mp_obj_module_t msgpack_module;
897867
_EVE_MODULE \
898868
FRAMEBUFFERIO_MODULE \
899869
FREQUENCYIO_MODULE \
900-
GAMEPAD_MODULE \
901-
GAMEPADSHIFT_MODULE \
902870
GNSS_MODULE \
903871
I2CPERIPHERAL_MODULE \
904872
IPADDRESS_MODULE \
@@ -971,7 +939,6 @@ struct _supervisor_allocation_node;
971939
const char *readline_hist[8]; \
972940
vstr_t *repl_line; \
973941
mp_obj_t rtc_time_source; \
974-
GAMEPAD_ROOT_POINTERS \
975942
KEYPAD_ROOT_POINTERS \
976943
mp_obj_t pew_singleton; \
977944
BOARD_UART_ROOT_POINTER \

py/circuitpy_mpconfig.mk

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,6 @@ CFLAGS += -DCIRCUITPY__EVE=$(CIRCUITPY__EVE)
184184
CIRCUITPY_FREQUENCYIO ?= $(CIRCUITPY_FULL_BUILD)
185185
CFLAGS += -DCIRCUITPY_FREQUENCYIO=$(CIRCUITPY_FREQUENCYIO)
186186

187-
CIRCUITPY_GAMEPAD ?= 0
188-
CFLAGS += -DCIRCUITPY_GAMEPAD=$(CIRCUITPY_GAMEPAD)
189-
190-
CIRCUITPY_GAMEPADSHIFT ?= 0
191-
CFLAGS += -DCIRCUITPY_GAMEPADSHIFT=$(CIRCUITPY_GAMEPADSHIFT)
192-
193187
CIRCUITPY_GNSS ?= 0
194188
CFLAGS += -DCIRCUITPY_GNSS=$(CIRCUITPY_GNSS)
195189

0 commit comments

Comments
 (0)