2020-01-08 23:32:45 -05:00
|
|
|
LD_FILE = $(FLASH).ld $(CHIP_FAMILY).ld imxrt10xx.ld
|
2019-11-02 11:52:26 -04:00
|
|
|
|
|
|
|
INTERNAL_LIBM = 1
|
|
|
|
|
2020-07-29 04:38:55 -04:00
|
|
|
USB_HIGHSPEED = 1
|
2020-01-08 23:32:45 -05:00
|
|
|
|
2021-02-04 19:23:40 -05:00
|
|
|
# Number of USB endpoint pairs.
|
2021-05-13 21:49:04 -04:00
|
|
|
USB_NUM_ENDPOINT_PAIRS = 8
|
2023-02-28 18:07:35 -05:00
|
|
|
# Align buffers on the cache boundary so we don't inadvertently load them early.
|
|
|
|
CIRCUITPY_TUSB_MEM_ALIGN = 32
|
2021-02-04 19:23:40 -05:00
|
|
|
|
2020-01-08 23:32:45 -05:00
|
|
|
INTERNAL_FLASH_FILESYSTEM = 1
|
|
|
|
|
mimxrt10xx: implement i2sout
tested on metro m7 (green prototype version) with max98357a i2s amplifier and the following test code:
```py
import board
import time
import digitalio
from audiobusio import I2SOut
from audiocore import RawSample
from microcontroller import pin
from ulab import numpy as np
n = np.array(np.sin(np.linspace(0, np.pi*2, 218, endpoint=False)) * 200, dtype=np.int16)
print(n)
r = RawSample(n, sample_rate=8000, channel_count=2)
def main():
with digitalio.DigitalInOut(board.LED) as l:
l.switch_to_output(True)
value = False
while True:
with I2SOut(pin.GPIO_06, pin.GPIO_07, pin.GPIO_04) as i:
time.sleep(.01)
l.value = value = not value
i.play(r, loop=True)
print(i.playing)
time.sleep(.5)
i.stop()
print("STOPPED")
print(i.playing)
time.sleep(.5)
i.play(r, loop=True)
print(i.playing)
print("PLAY AGAIN")
time.sleep(.5)
time.sleep(1)
```
Only stereo, 16-bit, raw samples were tested; the sample rate is actually fixed
at 48kHz in the core right now. There is more to do, but the basics work.
# Conflicts:
# ports/mimxrt10xx/Makefile
# ports/mimxrt10xx/mpconfigport.mk
2023-03-22 13:14:00 -04:00
|
|
|
CIRCUITPY_AUDIOBUSIO = 1
|
|
|
|
CIRCUITPY_AUDIOBUSIO_PDMIN = 0
|
|
|
|
CIRCUITPY_AUDIOCORE = 1
|
2020-01-08 23:32:45 -05:00
|
|
|
CIRCUITPY_AUDIOIO = 0
|
2023-03-21 12:58:51 -04:00
|
|
|
CIRCUITPY_AUDIOMIXER = 1
|
2023-03-21 13:17:17 -04:00
|
|
|
CIRCUITPY_AUDIOMP3 = 1
|
2023-03-23 15:00:14 -04:00
|
|
|
CIRCUITPY_AUDIOPWMIO = 1
|
2023-03-31 11:51:03 -04:00
|
|
|
CIRCUITPY_SYNTHIO_MAX_CHANNELS = 12
|
2021-04-06 10:19:09 -04:00
|
|
|
CIRCUITPY_BUSDEVICE = 1
|
2021-07-21 19:27:09 -04:00
|
|
|
CIRCUITPY_COUNTIO = 0
|
2020-01-08 23:32:45 -05:00
|
|
|
CIRCUITPY_FREQUENCYIO = 0
|
2022-08-09 13:06:18 -04:00
|
|
|
CIRCUITPY_I2CTARGET = 0
|
2020-01-08 23:32:45 -05:00
|
|
|
CIRCUITPY_NVM = 0
|
2021-08-29 08:29:32 -04:00
|
|
|
CIRCUITPY_PARALLELDISPLAY = 0
|
2021-07-21 19:27:09 -04:00
|
|
|
CIRCUITPY_PULSEIO = 0
|
2023-03-06 17:04:39 -05:00
|
|
|
CIRCUITPY_ROTARYIO = 1
|
|
|
|
CIRCUITPY_ROTARYIO_SOFTENCODER = 1
|
2021-03-18 17:51:47 -04:00
|
|
|
CIRCUITPY_USB_MIDI = 1
|
2020-01-08 23:32:45 -05:00
|
|
|
LONGINT_IMPL = MPZ
|
2022-05-13 05:38:03 -04:00
|
|
|
|
2022-07-19 17:35:51 -04:00
|
|
|
CIRCUITPY_BUILD_EXTENSIONS ?= hex,uf2
|