_pew: move to common-hal
I noticed that this code was referring to samd-specific functionality, and isn't enabled except in one samd board (pewpew10). Move it. There is incomplte support for _pew in mimxrt10xx which then caused build errors; adding a #if guard to check for _pew being enabled fixes it. The _pew module is not likely to be important on mimxrt but I'll leave the choice to remove it to someone else.
This commit is contained in:
parent
5a3a0a5092
commit
a580f0f1c4
|
@ -85,7 +85,9 @@
|
||||||
#if CIRCUITPY_GAMEPADSHIFT
|
#if CIRCUITPY_GAMEPADSHIFT
|
||||||
#include "shared-module/gamepadshift/__init__.h"
|
#include "shared-module/gamepadshift/__init__.h"
|
||||||
#endif
|
#endif
|
||||||
#include "shared-module/_pew/PewPew.h"
|
#if CIRCUITPY_PEW
|
||||||
|
#include "common-hal/_pew/PewPew.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
extern volatile bool mp_msc_enabled;
|
extern volatile bool mp_msc_enabled;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
#include "common-hal/pulseio/PulseIn.h"
|
#include "common-hal/pulseio/PulseIn.h"
|
||||||
#include "common-hal/pulseio/PulseOut.h"
|
#include "common-hal/pulseio/PulseOut.h"
|
||||||
#include "shared-module/_pew/PewPew.h"
|
#include "common-hal/_pew/PewPew.h"
|
||||||
#include "common-hal/frequencyio/FrequencyIn.h"
|
#include "common-hal/frequencyio/FrequencyIn.h"
|
||||||
|
|
||||||
extern void _PM_IRQ_HANDLER(void);
|
extern void _PM_IRQ_HANDLER(void);
|
||||||
|
|
|
@ -53,7 +53,9 @@
|
||||||
#if CIRCUITPY_GAMEPADSHIFT
|
#if CIRCUITPY_GAMEPADSHIFT
|
||||||
#include "shared-module/gamepadshift/__init__.h"
|
#include "shared-module/gamepadshift/__init__.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if CIRCUITPY_PEW
|
||||||
#include "shared-module/_pew/PewPew.h"
|
#include "shared-module/_pew/PewPew.h"
|
||||||
|
#endif
|
||||||
#include "supervisor/shared/tick.h"
|
#include "supervisor/shared/tick.h"
|
||||||
|
|
||||||
#include "clocks.h"
|
#include "clocks.h"
|
||||||
|
|
|
@ -259,6 +259,8 @@ SRC_COMMON_HAL_ALL = \
|
||||||
_bleio/PacketBuffer.c \
|
_bleio/PacketBuffer.c \
|
||||||
_bleio/Service.c \
|
_bleio/Service.c \
|
||||||
_bleio/UUID.c \
|
_bleio/UUID.c \
|
||||||
|
_pew/__init__.c \
|
||||||
|
_pew/PewPew.c \
|
||||||
analogio/AnalogIn.c \
|
analogio/AnalogIn.c \
|
||||||
analogio/AnalogOut.c \
|
analogio/AnalogOut.c \
|
||||||
analogio/__init__.c \
|
analogio/__init__.c \
|
||||||
|
@ -396,8 +398,6 @@ SRC_SHARED_MODULE_ALL = \
|
||||||
terminalio/__init__.c \
|
terminalio/__init__.c \
|
||||||
uheap/__init__.c \
|
uheap/__init__.c \
|
||||||
ustack/__init__.c \
|
ustack/__init__.c \
|
||||||
_pew/__init__.c \
|
|
||||||
_pew/PewPew.c \
|
|
||||||
_eve/__init__.c
|
_eve/__init__.c
|
||||||
|
|
||||||
# All possible sources are listed here, and are filtered by SRC_PATTERNS.
|
# All possible sources are listed here, and are filtered by SRC_PATTERNS.
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "shared-bindings/digitalio/DigitalInOut.h"
|
#include "shared-bindings/digitalio/DigitalInOut.h"
|
||||||
#include "shared-bindings/util.h"
|
#include "shared-bindings/util.h"
|
||||||
#include "PewPew.h"
|
#include "PewPew.h"
|
||||||
#include "shared-module/_pew/PewPew.h"
|
#include "common-hal/_pew/PewPew.h"
|
||||||
#include "supervisor/shared/translate.h"
|
#include "supervisor/shared/translate.h"
|
||||||
|
|
||||||
//| class PewPew:
|
//| class PewPew:
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
#include "py/runtime.h"
|
#include "py/runtime.h"
|
||||||
#include "py/mphal.h"
|
#include "py/mphal.h"
|
||||||
#include "PewPew.h"
|
#include "PewPew.h"
|
||||||
#include "shared-module/_pew/PewPew.h"
|
#include "common-hal/_pew/PewPew.h"
|
||||||
|
|
||||||
STATIC mp_obj_t get_pressed(void) {
|
STATIC mp_obj_t get_pressed(void) {
|
||||||
pew_obj_t *pew = MP_STATE_VM(pew_singleton);
|
pew_obj_t *pew = MP_STATE_VM(pew_singleton);
|
||||||
|
|
Loading…
Reference in New Issue