1 /* 2 * Copyright (c) 2023-2023 Huawei Device Co., Ltd. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without modification, 5 * are permitted provided that the following conditions are met: 6 * 7 * 1. Redistributions of source code must retain the above copyright notice, this list of 8 * conditions and the following disclaimer. 9 * 10 * 2. Redistributions in binary form must reproduce the above copyright notice, this list 11 * of conditions and the following disclaimer in the documentation and/or other materials 12 * provided with the distribution. 13 * 14 * 3. Neither the name of the copyright holder nor the names of its contributors may be used 15 * to endorse or promote products derived from this software without specific prior written 16 * permission. 17 * 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 20 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 25 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 26 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 27 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 28 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 #ifndef XTS_CMSID_H 32 #define XTS_CMSID_H 33 34 #include "xts_test.h" 35 #include <securec.h> 36 #include <limits.h> 37 #include "cmsis_os2.h" 38 39 #define LOS_WAIT_FOREVER 0xFFFFFFFF 40 41 #define TESTCOUNT_NUM_1 1 42 #define TESTCOUNT_NUM_2 2 43 #define TESTCOUNT_NUM_3 3 44 #define TESTCOUNT_NUM_4 4 45 #define TESTCOUNT_NUM_5 5 46 47 #define MSGQUEUE_COUNT 16 48 #define MSGQUEUE_SPACE_COUNT 13 49 #define MSGQUEUE_PUT_COUNT 3 50 #define MSG_SIZE 4 51 #define MSGINFO_LEN 4 52 #define TIMEOUT_COUNT 1000 53 #define BUF_LEN 32 54 #define MSGQUEUE_COUNT_INDEX_0 0 55 #define MSGQUEUE_COUNT_INDEX_1 1 56 #define MSGQUEUE_COUNT_INDEX_2 2 57 58 #define SEMAPHHORE_COUNT_HEX_MAX 0xFE 59 #define SEMAPHHORE_COUNT_INT0 0 60 #define SEMAPHHORE_COUNT_INT1 1 61 #define SEMAPHHORE_COUNT_INT10 10 62 63 #define EVENT_MASK_HEX_1 0x01 64 #define EVENT_MASK_HEX_2 0x02 65 #define EVENT_MASK_HEX_4 0x04 66 #define EVENT_MASK_HEX_10 0x10 67 #define EVENT_MASK_HEX_11 0x11 68 #define TIMEOUT_NUM_3 3 69 #define TIMEOUT_NUM_10 10 70 #define INVALID_FLAG_OPTION 0x00000004U 71 72 #define MILLISEC_NUM_INT10 10U 73 #define MILLISEC_NUM_INT4 4U 74 #define INVALID_TIMER_TYPE 10 75 #define TIMER_PERIODIC_COUNT 2 76 77 #define DELAY_TICKS_1 1 78 #define DELAY_TICKS_5 5 79 #define DELAY_TICKS_10 10 80 81 #define PRIORITY_COUNT_NOT_MIN 3 82 #define PRIORITY_COUNT_MIN_1 4 83 #define PRIORITY_COUNT_MIN_2 5 84 #define PRIORITY_COUNT_MIN_3 6 85 #define PRIORITY_COUNT_MIN_4 7 86 #define MAX_UINT32 0xFFFFFFFF 87 #define ALIVE_INFO_DIS 10000 88 89 #endif