Ram Gandikota / Mbed OS ABCD
Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pal_configuration.h Source File

pal_configuration.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 
00018 #ifndef _PAL_COFIGURATION_H
00019 #define _PAL_COFIGURATION_H
00020 
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 //! pal configuration options
00026 #define PAL_NET_TCP_AND_TLS_SUPPORT         true/* add pal support for TCP */
00027 #define PAL_NET_ASYNCHRONOUS_SOCKET_API     true/* add pal support for asynchronous sockets */
00028 #define PAL_NET_DNS_SUPPORT                 true/* add pal support for DNS lookup */
00029 
00030 #define PAL_RTOS_64BIT_TICK_SUPPORTED       false /* add pal support for asynchronous sockets */
00031 #define PAL_UNIQUE_THREAD_PRIORITY          (!defined(PAL_IGNORE_UNIQUE_THREAD_PRIORITY))/* if defined code skips the uniqueness priority check */
00032 
00033 //! number of valid priorities limits the number of threads- if priorities are added this value should be increased
00034 #define PAL_MAX_NUMBER_OF_THREADS 7 
00035 
00036 //! the maximal number of interfaces that can be supported at once.
00037 #define PAL_MAX_SUPORTED_NET_INTEFACES 5
00038 
00039 #ifdef __GNUC__ // we are compiling using GCC/G++
00040     #define PAL_TARGET_POINTER_SIZE __SIZEOF_POINTER__
00041     #ifdef __BYTE_ORDER
00042         #if __BYTE_ORDER == __BIG_ENDIAN //if both are not defined it is TRUE!
00043             #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
00044         #elif __BYTE_ORDER == __LITTLE_ENDIAN
00045             #define PAL_COMPILATION_ENDIANITY 0//define pal compilation endianity (0 is little endian, 1 is big endian)
00046         #else
00047             #error missing endiantiy defintion for GCC
00048         #endif
00049 
00050     #endif
00051 #else
00052     #ifdef __arm__ // we are compiling using the ARM compiler
00053         #define PAL_TARGET_POINTER_SIZE __sizeof_ptr
00054         #ifdef __BIG_ENDIAN
00055             #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
00056         #else 
00057             #define PAL_COMPILATION_ENDIANITY 0 //define pal compilation endianity (0 is little endian, 1 is big endian)
00058         #endif
00059     #else
00060         //#error neither ARMCC nor GCC used for compilation - not supported
00061     #endif
00062  
00063 
00064 #endif
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 #endif //_PAL_COFIGURATION_H