2 * Copyright (c) 2020 Project CHIP Authors
3 * Copyright (c) 2018-2019 Google LLC.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
20 * LwIP sys_arch definitions for use with FreeRTOS.
24 #ifndef CHIP_LWIP_FREERTOS_ARCH_SYS_ARCH_H
25 #define CHIP_LWIP_FREERTOS_ARCH_SYS_ARCH_H
32 #define SYS_MBOX_NULL ((xQueueHandle) NULL)
33 #define SYS_SEM_NULL ((xSemaphoreHandle) NULL)
34 #define SYS_DEFAULT_THREAD_STACK_DEPTH configMINIMAL_STACK_SIZE
35 #define SYS_MESG_QUEUE_LENGTH ((UBaseType_t) 6)
36 #define SYS_POST_BLOCK_TIME_MS 10000
38 typedef QueueHandle_t sys_mbox_t;
39 typedef xSemaphoreHandle sys_mutex_t;
40 typedef xSemaphoreHandle sys_sem_t;
41 typedef TaskHandle_t sys_thread_t;
42 typedef UBaseType_t sys_prot_t;
44 #include "arch/sys_arch.h"
48 #define sys_sem_valid(sem) (((sem) != NULL) && (*(sem) != NULL))
49 #define sys_sem_set_invalid(sem) \
58 #define sys_mutex_valid(mutex) (((mutex) != NULL) && (*(mutex) != NULL))
59 #define sys_mutex_set_invalid(mutex) \
62 if ((mutex) != NULL) \
68 #define sys_mbox_valid(mbox) (((mbox) != NULL) && (*(mbox) != NULL))
69 #define sys_mbox_set_invalid(mbox) \
78 #define sys_profile_interval_set_pbuf_highwatermark(...)
80 #endif /* CHIP_LWIP_FREERTOS_ARCH_SYS_ARCH_H */