1 /* 2 * FreeRTOS Kernel V11.1.0 3 * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 * Copyright (c) 2021 Raspberry Pi (Trading) Ltd. 5 * 6 * SPDX-License-Identifier: MIT AND BSD-3-Clause 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 * this software and associated documentation files (the "Software"), to deal in 10 * the Software without restriction, including without limitation the rights to 11 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 * the Software, and to permit persons to whom the Software is furnished to do so, 13 * subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice shall be included in all 16 * copies or substantial portions of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 20 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 21 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 22 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 23 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 * 25 * https://www.FreeRTOS.org 26 * https://github.com/FreeRTOS 27 */ 28 29 #ifndef RP2040_CONFIG_H 30 #define RP2040_CONFIG_H 31 32 /* *INDENT-OFF* */ 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 /* *INDENT-ON* */ 37 38 /* configUSE_DYNAMIC_EXCEPTION_HANDLERS == 1 means set the exception handlers dynamically on cores 39 * that need them in case the user has set up distinct vector table offsets per core 40 */ 41 #ifndef configUSE_DYNAMIC_EXCEPTION_HANDLERS 42 #if defined( PICO_NO_RAM_VECTOR_TABLE ) && ( PICO_NO_RAM_VECTOR_TABLE == 1 ) 43 #define configUSE_DYNAMIC_EXCEPTION_HANDLERS 0 44 #else 45 #define configUSE_DYNAMIC_EXCEPTION_HANDLERS 1 46 #endif 47 #endif 48 49 /* configSUPPORT_PICO_SYNC_INTEROP == 1 means that SDK pico_sync 50 * sem/mutex/queue etc. will work correctly when called from FreeRTOS tasks 51 */ 52 #ifndef configSUPPORT_PICO_SYNC_INTEROP 53 #if LIB_PICO_SYNC 54 #define configSUPPORT_PICO_SYNC_INTEROP 1 55 #endif 56 #endif 57 58 /* configSUPPORT_PICO_SYNC_INTEROP == 1 means that SDK pico_time 59 * sleep_ms/sleep_us/sleep_until will work correctly when called from FreeRTOS 60 * tasks, and will actually block at the FreeRTOS level 61 */ 62 #ifndef configSUPPORT_PICO_TIME_INTEROP 63 #if LIB_PICO_TIME 64 #define configSUPPORT_PICO_TIME_INTEROP 1 65 #endif 66 #endif 67 68 #if ( configNUMBER_OF_CORES > 1 ) 69 70 /* configTICK_CORE indicates which core should handle the SysTick 71 * interrupts */ 72 #ifndef configTICK_CORE 73 #define configTICK_CORE 0 74 #endif 75 #endif 76 77 /* This SMP port requires two spin locks, which are claimed from the SDK. 78 * the spin lock numbers to be used are defined statically and defaulted here 79 * to the values nominally set aside for RTOS by the SDK */ 80 #ifndef configSMP_SPINLOCK_0 81 #define configSMP_SPINLOCK_0 PICO_SPINLOCK_ID_OS1 82 #endif 83 84 #ifndef configSMP_SPINLOCK_1 85 #define configSMP_SPINLOCK_1 PICO_SPINLOCK_ID_OS2 86 #endif 87 88 /* *INDENT-OFF* */ 89 #ifdef __cplusplus 90 } 91 #endif 92 /* *INDENT-ON* */ 93 94 #endif /* ifndef RP2040_CONFIG_H */ 95