Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
pal_rtos_test_utils.h
00001 /* 00002 * Copyright (c) 2016 ARM Limited. All rights reserved. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * Licensed under the Apache License, Version 2.0 (the License); you may 00005 * not use this file except in compliance with the License. 00006 * You may obtain a copy of the License at 00007 * 00008 * http://www.apache.org/licenses/LICENSE-2.0 00009 * 00010 * Unless required by applicable law or agreed to in writing, software 00011 * distributed under the License is distributed on an AS IS BASIS, WITHOUT 00012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 * See the License for the specific language governing permissions and 00014 * limitations under the License. 00015 */ 00016 00017 #ifndef _PAL_RTOS_TEST_UTILS_H 00018 #define _PAL_RTOS_TEST_UTILS_H 00019 00020 #include "pal_types.h" 00021 #include "pal_rtos.h" 00022 #include "pal_test_utils.h" 00023 00024 #define THREAD_STACK_SIZE 1024*sizeof(uint32_t) 00025 00026 typedef struct threadsArgument{ 00027 uint32_t arg1; 00028 uint32_t arg2; 00029 uint32_t arg3; 00030 uint32_t arg4; 00031 uint32_t arg5; 00032 uint32_t arg6; 00033 uint32_t arg7; 00034 }threadsArgument_t; 00035 00036 00037 extern threadsArgument_t g_threadsArg; 00038 00039 extern uint32_t g_threadStorage[20]; 00040 00041 void palThreadFunc1(void const *argument); 00042 void palThreadFunc2(void const *argument); 00043 void palThreadFunc3(void const *argument); 00044 void palThreadFunc4(void const *argument); 00045 void palThreadFunc5(void const *argument); 00046 void palThreadFunc6(void const *argument); 00047 00048 00049 typedef struct timerArgument{ 00050 uint32_t ticksBeforeTimer; 00051 uint32_t ticksInFunc1; 00052 uint32_t ticksInFunc2; 00053 }timerArgument_t; 00054 00055 extern timerArgument_t g_timerArgs; 00056 00057 void palTimerFunc1(void const *argument); 00058 void palTimerFunc2(void const *argument); 00059 00060 00061 void palThreadFuncCustom1(void const *argument); 00062 void palThreadFuncCustom2(void const *argument); 00063 void palThreadFuncCustom3(void const *argument); 00064 void palThreadFuncCustom4(void const *argument); 00065 00066 00067 #define MEMORY_POOL1_BLOCK_SIZE 32 00068 #define MEMORY_POOL1_BLOCK_COUNT 5 00069 #define MEMORY_POOL2_BLOCK_SIZE 12 00070 #define MEMORY_POOL2_BLOCK_COUNT 4 00071 00072 extern palMutexID_t mutex1; 00073 extern palMutexID_t mutex2; 00074 00075 extern palSemaphoreID_t semaphore1; 00076 00077 #endif //_PAL_RTOS_TEST_UTILS_H
Generated on Tue Jul 12 2022 21:20:29 by
1.7.2