circuitpython/ports/nrf/mpconfigport.mk
Jeff Epler a183425e00 ports/nrf: Implement audioio.AudioOut using PWM
This implements AudioOut, with known caveats:
 * pause/resume are not yet implemented (this is just a bug)
 * at best, the sample fidelity is 8 bits (this is a hardware limitation)

Testing performed:

My test system is a Particle Xenon with a PAM8302 op-amp
https://www.adafruit.com/product/2130 and 8-ohm speaker.  There's no
analog filtering between the Xenon's PWM pin and the "A+" input of
the amplifier; the "A-" pin is disconnected.  It is powered from
VUSB.

I used pin D4, which is *NOT* listed as a low-speed-only pin, but
the code does NOT switch the pin to high drive.  This is related to
an open issue for general inability to set drive level for pins
being used by a "special function" on nrf:
https://github.com/adafruit/circuitpython/issues/1270

Nothing about the code I've written should limit the usable pins.

All samples I played were 16-bit, generally monophonic at 11025Hz
and 22050Hz from the Debian LibreOffice package.
2019-07-26 07:57:11 -05:00

37 lines
981 B
Makefile

# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk
# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers.
# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h.
MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz
INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 16
# All nRF ports have longints.
LONGINT_IMPL = MPZ
# Audio via PWM
CIRCUITPY_AUDIOCORE = 1
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOPWMIO = 1
# No I2S yet.
CIRCUITPY_AUDIOBUSIO = 0
# No I2CSlave implementation
CIRCUITPY_I2CSLAVE = 0
# enable NVM
CIRCUITPY_NVM = 1
# enable RTC
CIRCUITPY_RTC = 1
# frequencyio not yet implemented
CIRCUITPY_FREQUENCYIO = 0
# CircuitPython doesn't yet support NFC so force the NFC antenna pins to be GPIO.
# See https://github.com/adafruit/circuitpython/issues/1300
# Defined here because system_nrf52840.c doesn't #include any of our own include files.
CFLAGS += -DCONFIG_NFCT_PINS_AS_GPIOS