Skip to content

Commit

Permalink
Merge 33add63 into 27767aa
Browse files Browse the repository at this point in the history
  • Loading branch information
glennrub committed Jul 21, 2020
2 parents 27767aa + 33add63 commit efff431
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 3 deletions.
61 changes: 61 additions & 0 deletions ports/nrf/mpconfigdevice_nrf51822.h
@@ -0,0 +1,61 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Glenn Ruben Bakke
*
* 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.
*/

// Board overridable build configuration.

#ifndef MICROPY_MBFS
#define MICROPY_MBFS (1)
#endif

#ifndef MICROPY_VFS
#define MICROPY_VFS (0)
#endif

// Board overridable feature configuration.

#ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN
#if defined(BLUETOOTH_SD)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
#else
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#endif
#endif

#ifndef MICROPY_PY_SYS_STDFILES
#if defined(BLUETOOTH_SD)
#define MICROPY_PY_SYS_STDFILES (0)
#else
#define MICROPY_PY_SYS_STDFILES (1)
#endif
#endif

#ifndef MICROPY_PY_UBINASCII
#if defined(BLUETOOTH_SD)
#define MICROPY_PY_UBINASCII (0)
#else
#define MICROPY_PY_UBINASCII (1)
#endif
#endif
49 changes: 49 additions & 0 deletions ports/nrf/mpconfigdevice_nrf52832.h
@@ -0,0 +1,49 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Glenn Ruben Bakke
*
* 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.
*/

// Board overridable build configuration.

#ifndef MICROPY_MBFS
#define MICROPY_MBFS (1)
#endif

#ifndef MICROPY_VFS
#define MICROPY_VFS (0)
#endif

// Board overridable feature configuration.

#ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#endif

#ifndef MICROPY_PY_SYS_STDFILES
#define MICROPY_PY_SYS_STDFILES (1)
#endif

#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
49 changes: 49 additions & 0 deletions ports/nrf/mpconfigdevice_nrf52840.h
@@ -0,0 +1,49 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Glenn Ruben Bakke
*
* 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.
*/

// Board overridable build configuration.

#ifndef MICROPY_MBFS
#define MICROPY_MBFS (1)
#endif

#ifndef MICROPY_VFS
#define MICROPY_VFS (0)
#endif

// Board overridable feature configuration.

#ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#endif

#ifndef MICROPY_PY_SYS_STDFILES
#define MICROPY_PY_SYS_STDFILES (1)
#endif

#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
49 changes: 49 additions & 0 deletions ports/nrf/mpconfigdevice_nrf9160.h
@@ -0,0 +1,49 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2020 Glenn Ruben Bakke
*
* 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.
*/

// Board overridable build configuration.

#ifndef MICROPY_MBFS
#define MICROPY_MBFS (1)
#endif

#ifndef MICROPY_VFS
#define MICROPY_VFS (0)
#endif

// Board overridable feature configuration.

#ifndef MICROPY_PY_ARRAY_SLICE_ASSIGN
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#endif

#ifndef MICROPY_PY_SYS_STDFILES
#define MICROPY_PY_SYS_STDFILES (1)
#endif

#ifndef MICROPY_PY_UBINASCII
#define MICROPY_PY_UBINASCII (1)
#endif
15 changes: 12 additions & 3 deletions ports/nrf/mpconfigport.h
Expand Up @@ -29,6 +29,18 @@

#include <mpconfigboard.h>

#if defined(NRF51822)
#include "mpconfigdevice_nrf51822.h"
#elif defined(NRF52832)
#include "mpconfigdevice_nrf52832.h"
#elif defined(NRF52840)
#include "mpconfigdevice_nrf52840.h"
#elif defined(NRF9160)
#include "mpconfigdevice_nrf9160.h"
#else
#pragma error "Device not defined"
#endif

// options to control how MicroPython is built
#ifndef MICROPY_VFS
#define MICROPY_VFS (0)
Expand Down Expand Up @@ -105,19 +117,16 @@
#define MICROPY_MODULE_BUILTIN_INIT (1)
#define MICROPY_PY_ALL_SPECIAL_METHODS (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (0)
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (0)
#define MICROPY_PY_SYS_EXIT (1)
#define MICROPY_PY_SYS_MAXSIZE (1)
#define MICROPY_PY_SYS_STDFILES (0)
#define MICROPY_PY_SYS_STDIO_BUFFER (0)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (0)
#define MICROPY_PY_CMATH (0)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_IO_FILEIO (0)
#define MICROPY_PY_UERRNO (0)
#define MICROPY_PY_UBINASCII (0)
#define MICROPY_PY_URANDOM (1)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1)
#define MICROPY_PY_UCTYPES (0)
Expand Down

0 comments on commit efff431

Please sign in to comment.