A metronome using the FRDM K64F board

Committer:
ram54288
Date:
Sun May 14 18:40:18 2017 +0000
Revision:
0:a7a43371b306
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ram54288 0:a7a43371b306 1 /*
ram54288 0:a7a43371b306 2 * Copyright (c) 2016 ARM Limited. All rights reserved.
ram54288 0:a7a43371b306 3 * SPDX-License-Identifier: Apache-2.0
ram54288 0:a7a43371b306 4 * Licensed under the Apache License, Version 2.0 (the License); you may
ram54288 0:a7a43371b306 5 * not use this file except in compliance with the License.
ram54288 0:a7a43371b306 6 * You may obtain a copy of the License at
ram54288 0:a7a43371b306 7 *
ram54288 0:a7a43371b306 8 * http://www.apache.org/licenses/LICENSE-2.0
ram54288 0:a7a43371b306 9 *
ram54288 0:a7a43371b306 10 * Unless required by applicable law or agreed to in writing, software
ram54288 0:a7a43371b306 11 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
ram54288 0:a7a43371b306 12 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ram54288 0:a7a43371b306 13 * See the License for the specific language governing permissions and
ram54288 0:a7a43371b306 14 * limitations under the License.
ram54288 0:a7a43371b306 15 */
ram54288 0:a7a43371b306 16
ram54288 0:a7a43371b306 17
ram54288 0:a7a43371b306 18 #ifndef _PAL_COFIGURATION_H
ram54288 0:a7a43371b306 19 #define _PAL_COFIGURATION_H
ram54288 0:a7a43371b306 20
ram54288 0:a7a43371b306 21 #ifdef __cplusplus
ram54288 0:a7a43371b306 22 extern "C" {
ram54288 0:a7a43371b306 23 #endif
ram54288 0:a7a43371b306 24
ram54288 0:a7a43371b306 25 //! pal configuration options
ram54288 0:a7a43371b306 26 #define PAL_NET_TCP_AND_TLS_SUPPORT true/* add pal support for TCP */
ram54288 0:a7a43371b306 27 #define PAL_NET_ASYNCHRONOUS_SOCKET_API true/* add pal support for asynchronous sockets */
ram54288 0:a7a43371b306 28 #define PAL_NET_DNS_SUPPORT true/* add pal support for DNS lookup */
ram54288 0:a7a43371b306 29
ram54288 0:a7a43371b306 30 #define PAL_RTOS_64BIT_TICK_SUPPORTED false /* add pal support for asynchronous sockets */
ram54288 0:a7a43371b306 31 #define PAL_UNIQUE_THREAD_PRIORITY (!defined(PAL_IGNORE_UNIQUE_THREAD_PRIORITY))/* if defined code skips the uniqueness priority check */
ram54288 0:a7a43371b306 32
ram54288 0:a7a43371b306 33 //! number of valid priorities limits the number of threads- if priorities are added this value should be increased
ram54288 0:a7a43371b306 34 #define PAL_MAX_NUMBER_OF_THREADS 7
ram54288 0:a7a43371b306 35
ram54288 0:a7a43371b306 36 //! the maximal number of interfaces that can be supported at once.
ram54288 0:a7a43371b306 37 #define PAL_MAX_SUPORTED_NET_INTEFACES 5
ram54288 0:a7a43371b306 38
ram54288 0:a7a43371b306 39 #ifdef __GNUC__ // we are compiling using GCC/G++
ram54288 0:a7a43371b306 40 #define PAL_TARGET_POINTER_SIZE __SIZEOF_POINTER__
ram54288 0:a7a43371b306 41 #ifdef __BYTE_ORDER
ram54288 0:a7a43371b306 42 #if __BYTE_ORDER == __BIG_ENDIAN //if both are not defined it is TRUE!
ram54288 0:a7a43371b306 43 #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
ram54288 0:a7a43371b306 44 #elif __BYTE_ORDER == __LITTLE_ENDIAN
ram54288 0:a7a43371b306 45 #define PAL_COMPILATION_ENDIANITY 0//define pal compilation endianity (0 is little endian, 1 is big endian)
ram54288 0:a7a43371b306 46 #else
ram54288 0:a7a43371b306 47 #error missing endiantiy defintion for GCC
ram54288 0:a7a43371b306 48 #endif
ram54288 0:a7a43371b306 49
ram54288 0:a7a43371b306 50 #endif
ram54288 0:a7a43371b306 51 #else
ram54288 0:a7a43371b306 52 #ifdef __arm__ // we are compiling using the ARM compiler
ram54288 0:a7a43371b306 53 #define PAL_TARGET_POINTER_SIZE __sizeof_ptr
ram54288 0:a7a43371b306 54 #ifdef __BIG_ENDIAN
ram54288 0:a7a43371b306 55 #define PAL_COMPILATION_ENDIANITY 1 //define pal compilation endianity (0 is little endian, 1 is big endian)
ram54288 0:a7a43371b306 56 #else
ram54288 0:a7a43371b306 57 #define PAL_COMPILATION_ENDIANITY 0 //define pal compilation endianity (0 is little endian, 1 is big endian)
ram54288 0:a7a43371b306 58 #endif
ram54288 0:a7a43371b306 59 #else
ram54288 0:a7a43371b306 60 //#error neither ARMCC nor GCC used for compilation - not supported
ram54288 0:a7a43371b306 61 #endif
ram54288 0:a7a43371b306 62
ram54288 0:a7a43371b306 63
ram54288 0:a7a43371b306 64 #endif
ram54288 0:a7a43371b306 65
ram54288 0:a7a43371b306 66 #ifdef __cplusplus
ram54288 0:a7a43371b306 67 }
ram54288 0:a7a43371b306 68 #endif
ram54288 0:a7a43371b306 69 #endif //_PAL_COFIGURATION_H