Fork of the GitHub

Committer:
DiegoOstuni
Date:
Thu Nov 14 14:34:50 2019 +0000
Revision:
0:75fc82583a41
Add files

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DiegoOstuni 0:75fc82583a41 1
DiegoOstuni 0:75fc82583a41 2 /******************************************************************************
DiegoOstuni 0:75fc82583a41 3 * @attention
DiegoOstuni 0:75fc82583a41 4 *
DiegoOstuni 0:75fc82583a41 5 * <h2><center>&copy; COPYRIGHT 2016 STMicroelectronics</center></h2>
DiegoOstuni 0:75fc82583a41 6 *
DiegoOstuni 0:75fc82583a41 7 * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License");
DiegoOstuni 0:75fc82583a41 8 * You may not use this file except in compliance with the License.
DiegoOstuni 0:75fc82583a41 9 * You may obtain a copy of the License at:
DiegoOstuni 0:75fc82583a41 10 *
DiegoOstuni 0:75fc82583a41 11 * http://www.st.com/myliberty
DiegoOstuni 0:75fc82583a41 12 *
DiegoOstuni 0:75fc82583a41 13 * Unless required by applicable law or agreed to in writing, software
DiegoOstuni 0:75fc82583a41 14 * distributed under the License is distributed on an "AS IS" BASIS,
DiegoOstuni 0:75fc82583a41 15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
DiegoOstuni 0:75fc82583a41 16 * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY,
DiegoOstuni 0:75fc82583a41 17 * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
DiegoOstuni 0:75fc82583a41 18 * See the License for the specific language governing permissions and
DiegoOstuni 0:75fc82583a41 19 * limitations under the License.
DiegoOstuni 0:75fc82583a41 20 *
DiegoOstuni 0:75fc82583a41 21 ******************************************************************************/
DiegoOstuni 0:75fc82583a41 22 /*! \file
DiegoOstuni 0:75fc82583a41 23 *
DiegoOstuni 0:75fc82583a41 24 * \author
DiegoOstuni 0:75fc82583a41 25 *
DiegoOstuni 0:75fc82583a41 26 * \brief Platform header file. Defining platform independent functionality.
DiegoOstuni 0:75fc82583a41 27 *
DiegoOstuni 0:75fc82583a41 28 */
DiegoOstuni 0:75fc82583a41 29
DiegoOstuni 0:75fc82583a41 30
DiegoOstuni 0:75fc82583a41 31 /*
DiegoOstuni 0:75fc82583a41 32 * PROJECT:
DiegoOstuni 0:75fc82583a41 33 * $Revision: $
DiegoOstuni 0:75fc82583a41 34 * LANGUAGE: ISO C99
DiegoOstuni 0:75fc82583a41 35 */
DiegoOstuni 0:75fc82583a41 36
DiegoOstuni 0:75fc82583a41 37 /*! \file platform.h
DiegoOstuni 0:75fc82583a41 38 *
DiegoOstuni 0:75fc82583a41 39 * \author Gustavo Patricio
DiegoOstuni 0:75fc82583a41 40 *
DiegoOstuni 0:75fc82583a41 41 * \brief Platform specific definition layer
DiegoOstuni 0:75fc82583a41 42 *
DiegoOstuni 0:75fc82583a41 43 * This should contain all platform and hardware specifics such as
DiegoOstuni 0:75fc82583a41 44 * GPIO assignment, system resources, locks, IRQs, etc
DiegoOstuni 0:75fc82583a41 45 *
DiegoOstuni 0:75fc82583a41 46 * Each distinct platform/system/board must provide this definitions
DiegoOstuni 0:75fc82583a41 47 * for all SW layers to use
DiegoOstuni 0:75fc82583a41 48 *
DiegoOstuni 0:75fc82583a41 49 */
DiegoOstuni 0:75fc82583a41 50
DiegoOstuni 0:75fc82583a41 51 #ifndef PLATFORM1_H
DiegoOstuni 0:75fc82583a41 52 #define PLATFORM1_H
DiegoOstuni 0:75fc82583a41 53
DiegoOstuni 0:75fc82583a41 54 /*
DiegoOstuni 0:75fc82583a41 55 ******************************************************************************
DiegoOstuni 0:75fc82583a41 56 * INCLUDES
DiegoOstuni 0:75fc82583a41 57 ******************************************************************************
DiegoOstuni 0:75fc82583a41 58 */
DiegoOstuni 0:75fc82583a41 59 /*#if defined(STM32L476xx)
DiegoOstuni 0:75fc82583a41 60 #include "stm32l4xx_hal.h"
DiegoOstuni 0:75fc82583a41 61 #elif defined(STM32F401xE)
DiegoOstuni 0:75fc82583a41 62 */
DiegoOstuni 0:75fc82583a41 63 #include "stm32f4xx_hal.h"
DiegoOstuni 0:75fc82583a41 64 /*#else
DiegoOstuni 0:75fc82583a41 65 //#include "stm32l0xx_hal.h"
DiegoOstuni 0:75fc82583a41 66 #endif
DiegoOstuni 0:75fc82583a41 67 */
DiegoOstuni 0:75fc82583a41 68
DiegoOstuni 0:75fc82583a41 69 #include "stdint.h"
DiegoOstuni 0:75fc82583a41 70 #include "stdbool.h"
DiegoOstuni 0:75fc82583a41 71 #include "limits.h"
DiegoOstuni 0:75fc82583a41 72 #include "timer1.h"
DiegoOstuni 0:75fc82583a41 73 #include "main.h"
DiegoOstuni 0:75fc82583a41 74 #include "logger.h"
DiegoOstuni 0:75fc82583a41 75 #include "mbed.h"
DiegoOstuni 0:75fc82583a41 76
DiegoOstuni 0:75fc82583a41 77
DiegoOstuni 0:75fc82583a41 78 /*
DiegoOstuni 0:75fc82583a41 79 ******************************************************************************
DiegoOstuni 0:75fc82583a41 80 * GLOBAL DEFINES
DiegoOstuni 0:75fc82583a41 81 ******************************************************************************
DiegoOstuni 0:75fc82583a41 82 */
DiegoOstuni 0:75fc82583a41 83
DiegoOstuni 0:75fc82583a41 84 /*
DiegoOstuni 0:75fc82583a41 85 ******************************************************************************
DiegoOstuni 0:75fc82583a41 86 * GLOBAL MACROS
DiegoOstuni 0:75fc82583a41 87 ******************************************************************************
DiegoOstuni 0:75fc82583a41 88 */
DiegoOstuni 0:75fc82583a41 89
DiegoOstuni 0:75fc82583a41 90
DiegoOstuni 0:75fc82583a41 91 #define platformIrqST25R3911SetCallback( cb )
DiegoOstuni 0:75fc82583a41 92
DiegoOstuni 0:75fc82583a41 93
DiegoOstuni 0:75fc82583a41 94 #define platformIrqST25R3916SetCallback( cb )
DiegoOstuni 0:75fc82583a41 95
DiegoOstuni 0:75fc82583a41 96 #define platformTimerCreate( t ) timerCalculateTimer(t) /*!< Create a timer with the given time (ms) */
DiegoOstuni 0:75fc82583a41 97 #define platformTimerIsExpired( timer ) timerIsExpired(timer) /*!< Checks if the given timer is expired */
DiegoOstuni 0:75fc82583a41 98 #define platformDelay( t ) HAL_Delay( t ) /*!< Performs a delay for the given time (ms) */
DiegoOstuni 0:75fc82583a41 99
DiegoOstuni 0:75fc82583a41 100 #define platformGetSysTick() HAL_GetTick() /*!< Get System Tick ( 1 tick = 1 ms) */
DiegoOstuni 0:75fc82583a41 101
DiegoOstuni 0:75fc82583a41 102
DiegoOstuni 0:75fc82583a41 103
DiegoOstuni 0:75fc82583a41 104 /*
DiegoOstuni 0:75fc82583a41 105 ******************************************************************************
DiegoOstuni 0:75fc82583a41 106 * RFAL FEATURES CONFIGURATION
DiegoOstuni 0:75fc82583a41 107 ******************************************************************************
DiegoOstuni 0:75fc82583a41 108 */
DiegoOstuni 0:75fc82583a41 109
DiegoOstuni 0:75fc82583a41 110 #define RFAL_FEATURE_NFCA true /*!< Enable/Disable RFAL support for NFC-A (ISO14443A) */
DiegoOstuni 0:75fc82583a41 111 #define RFAL_FEATURE_NFCB true /*!< Enable/Disable RFAL support for NFC-B (ISO14443B) */
DiegoOstuni 0:75fc82583a41 112 #define RFAL_FEATURE_NFCF true /*!< Enable/Disable RFAL support for NFC-F (FeliCa) */
DiegoOstuni 0:75fc82583a41 113 #define RFAL_FEATURE_NFCV true /*!< Enable/Disable RFAL support for NFC-V (ISO15693) */
DiegoOstuni 0:75fc82583a41 114 #define RFAL_FEATURE_T1T true /*!< Enable/Disable RFAL support for T1T (Topaz) */
DiegoOstuni 0:75fc82583a41 115 #define RFAL_FEATURE_ST25TB true /*!< Enable/Disable RFAL support for ST25TB */
DiegoOstuni 0:75fc82583a41 116 #define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG false /*!< Enable/Disable Analog Configs to be dynamically updated (RAM) */
DiegoOstuni 0:75fc82583a41 117 #define RFAL_FEATURE_DYNAMIC_POWER false /*!< Enable/Disable RFAL dynamic power support */
DiegoOstuni 0:75fc82583a41 118 #define RFAL_FEATURE_ISO_DEP true /*!< Enable/Disable RFAL support for ISO-DEP (ISO14443-4) */
DiegoOstuni 0:75fc82583a41 119 #define RFAL_FEATURE_NFC_DEP true /*!< Enable/Disable RFAL support for NFC-DEP (NFCIP1/P2P) */
DiegoOstuni 0:75fc82583a41 120
DiegoOstuni 0:75fc82583a41 121
DiegoOstuni 0:75fc82583a41 122 #define RFAL_FEATURE_ISO_DEP_IBLOCK_MAX_LEN 256 /*!< ISO-DEP I-Block max length. Please use values as defined by rfalIsoDepFSx */
DiegoOstuni 0:75fc82583a41 123 #define RFAL_FEATURE_ISO_DEP_APDU_MAX_LEN 1024 /*!< ISO-DEP APDU max length. Please use multiples of I-Block max length */
DiegoOstuni 0:75fc82583a41 124
DiegoOstuni 0:75fc82583a41 125 #endif /* PLATFORM1_H */
DiegoOstuni 0:75fc82583a41 126
DiegoOstuni 0:75fc82583a41 127