2019-02-15 00:28:20 -05:00
|
|
|
/*
|
|
|
|
* This file is part of the MicroPython project, http://micropython.org/
|
|
|
|
*
|
|
|
|
* The MIT License (MIT)
|
|
|
|
*
|
|
|
|
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to deal
|
|
|
|
* in the Software without restriction, including without limitation the rights
|
|
|
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
* THE SOFTWARE.
|
|
|
|
*/
|
2016-08-19 23:24:04 -04:00
|
|
|
|
2016-08-23 20:36:29 -04:00
|
|
|
#ifndef __INCLUDED_MPCONFIGPORT_H
|
|
|
|
#define __INCLUDED_MPCONFIGPORT_H
|
|
|
|
|
2019-02-15 00:28:20 -05:00
|
|
|
// Definitions for which SAMD chip we're using.
|
2017-09-22 21:05:51 -04:00
|
|
|
#include "include/sam.h"
|
|
|
|
|
|
|
|
#ifdef SAMD21
|
2018-10-07 13:51:24 -04:00
|
|
|
#define CIRCUITPY_MCU_FAMILY samd21
|
2017-10-10 14:36:00 -04:00
|
|
|
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
|
2018-10-07 13:51:24 -04:00
|
|
|
#define PORT_HEAP_SIZE (16384 + 4096)
|
2018-10-19 21:46:22 -04:00
|
|
|
#define SPI_FLASH_MAX_BAUDRATE 8000000
|
2018-10-07 15:54:53 -04:00
|
|
|
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
|
2019-02-15 00:28:20 -05:00
|
|
|
|
|
|
|
#define CIRCUITPY_I2C_SLAVE (0)
|
|
|
|
|
2018-10-07 14:43:39 -04:00
|
|
|
#define MICROPY_CPYTHON_COMPAT (0)
|
|
|
|
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
|
|
|
|
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
|
|
|
|
#define MICROPY_PY_FUNCTION_ATTRS (0)
|
|
|
|
#define MICROPY_PY_IO (0)
|
|
|
|
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
|
2018-11-12 10:17:07 -05:00
|
|
|
#define MICROPY_PY_UERRNO_LIST \
|
|
|
|
X(EPERM) \
|
|
|
|
X(ENOENT) \
|
|
|
|
X(EIO) \
|
|
|
|
X(EAGAIN) \
|
|
|
|
X(ENOMEM) \
|
|
|
|
X(EACCES) \
|
|
|
|
X(EEXIST) \
|
|
|
|
X(ENODEV) \
|
|
|
|
X(EISDIR) \
|
|
|
|
X(EINVAL) \
|
|
|
|
|
2018-05-18 06:31:23 -04:00
|
|
|
#endif
|
2017-09-22 21:05:51 -04:00
|
|
|
|
|
|
|
#ifdef SAMD51
|
2018-10-07 13:51:24 -04:00
|
|
|
#define CIRCUITPY_MCU_FAMILY samd51
|
2017-10-10 14:36:00 -04:00
|
|
|
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
|
2019-02-15 00:28:20 -05:00
|
|
|
// 128KiB
|
|
|
|
#define PORT_HEAP_SIZE (0x20000)
|
2018-10-19 21:46:22 -04:00
|
|
|
#define SPI_FLASH_MAX_BAUDRATE 24000000
|
2018-10-22 20:57:28 -04:00
|
|
|
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
|
2018-10-07 14:43:39 -04:00
|
|
|
#define MICROPY_CPYTHON_COMPAT (1)
|
|
|
|
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
|
|
|
|
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
|
|
|
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
|
|
|
#define MICROPY_PY_IO (1)
|
|
|
|
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
|
2018-11-12 10:17:07 -05:00
|
|
|
// MICROPY_PY_UERRNO_LIST - Use the default
|
2018-05-21 23:58:03 -04:00
|
|
|
#endif
|
|
|
|
|
2019-02-15 00:28:20 -05:00
|
|
|
// Turning off audioio, audiobusio, and touchio as necessary
|
|
|
|
// due to limitations of chips is handled in mpconfigboard.mk
|
2016-08-19 23:24:04 -04:00
|
|
|
|
2018-06-15 19:16:21 -04:00
|
|
|
#include "peripherals/samd/dma.h"
|
2018-03-12 19:09:13 -04:00
|
|
|
|
2016-08-19 23:24:04 -04:00
|
|
|
#define MICROPY_PORT_ROOT_POINTERS \
|
2019-02-15 00:28:20 -05:00
|
|
|
CIRCUITPY_COMMON_ROOT_POINTERS \
|
2018-03-12 19:09:13 -04:00
|
|
|
mp_obj_t playing_audio[AUDIO_DMA_CHANNEL_COUNT]; \
|
2016-11-29 17:58:37 -05:00
|
|
|
|
2019-02-15 00:28:20 -05:00
|
|
|
#include "ports/circuitpy-common/mpconfig_circuitpy.h"
|
2017-05-12 19:45:38 -04:00
|
|
|
|
2016-08-23 20:36:29 -04:00
|
|
|
#endif // __INCLUDED_MPCONFIGPORT_H
|