RFAL library for the STMicroelectronics X-NUCLEO-NFC05A1
Diff: platform1.h
- Revision:
- 0:75fc82583a41
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/platform1.h Thu Nov 14 14:34:50 2019 +0000 @@ -0,0 +1,127 @@ + +/****************************************************************************** + * @attention + * + * <h2><center>© COPYRIGHT 2016 STMicroelectronics</center></h2> + * + * Licensed under ST MYLIBERTY SOFTWARE LICENSE AGREEMENT (the "License"); + * You may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.st.com/myliberty + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, + * AND SPECIFICALLY DISCLAIMING THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + * See the License for the specific language governing permissions and + * limitations under the License. + * +******************************************************************************/ +/*! \file + * + * \author + * + * \brief Platform header file. Defining platform independent functionality. + * + */ + + +/* + * PROJECT: + * $Revision: $ + * LANGUAGE: ISO C99 + */ + +/*! \file platform.h + * + * \author Gustavo Patricio + * + * \brief Platform specific definition layer + * + * This should contain all platform and hardware specifics such as + * GPIO assignment, system resources, locks, IRQs, etc + * + * Each distinct platform/system/board must provide this definitions + * for all SW layers to use + * + */ + +#ifndef PLATFORM1_H +#define PLATFORM1_H + +/* +****************************************************************************** +* INCLUDES +****************************************************************************** +*/ +/*#if defined(STM32L476xx) +#include "stm32l4xx_hal.h" +#elif defined(STM32F401xE) +*/ +#include "stm32f4xx_hal.h" +/*#else +//#include "stm32l0xx_hal.h" +#endif +*/ + +#include "stdint.h" +#include "stdbool.h" +#include "limits.h" +#include "timer1.h" +#include "main.h" +#include "logger.h" +#include "mbed.h" + + +/* +****************************************************************************** +* GLOBAL DEFINES +****************************************************************************** +*/ + +/* +****************************************************************************** +* GLOBAL MACROS +****************************************************************************** +*/ + + +#define platformIrqST25R3911SetCallback( cb ) + + +#define platformIrqST25R3916SetCallback( cb ) + +#define platformTimerCreate( t ) timerCalculateTimer(t) /*!< Create a timer with the given time (ms) */ +#define platformTimerIsExpired( timer ) timerIsExpired(timer) /*!< Checks if the given timer is expired */ +#define platformDelay( t ) HAL_Delay( t ) /*!< Performs a delay for the given time (ms) */ + +#define platformGetSysTick() HAL_GetTick() /*!< Get System Tick ( 1 tick = 1 ms) */ + + + +/* +****************************************************************************** +* RFAL FEATURES CONFIGURATION +****************************************************************************** +*/ + +#define RFAL_FEATURE_NFCA true /*!< Enable/Disable RFAL support for NFC-A (ISO14443A) */ +#define RFAL_FEATURE_NFCB true /*!< Enable/Disable RFAL support for NFC-B (ISO14443B) */ +#define RFAL_FEATURE_NFCF true /*!< Enable/Disable RFAL support for NFC-F (FeliCa) */ +#define RFAL_FEATURE_NFCV true /*!< Enable/Disable RFAL support for NFC-V (ISO15693) */ +#define RFAL_FEATURE_T1T true /*!< Enable/Disable RFAL support for T1T (Topaz) */ +#define RFAL_FEATURE_ST25TB true /*!< Enable/Disable RFAL support for ST25TB */ +#define RFAL_FEATURE_DYNAMIC_ANALOG_CONFIG false /*!< Enable/Disable Analog Configs to be dynamically updated (RAM) */ +#define RFAL_FEATURE_DYNAMIC_POWER false /*!< Enable/Disable RFAL dynamic power support */ +#define RFAL_FEATURE_ISO_DEP true /*!< Enable/Disable RFAL support for ISO-DEP (ISO14443-4) */ +#define RFAL_FEATURE_NFC_DEP true /*!< Enable/Disable RFAL support for NFC-DEP (NFCIP1/P2P) */ + + +#define RFAL_FEATURE_ISO_DEP_IBLOCK_MAX_LEN 256 /*!< ISO-DEP I-Block max length. Please use values as defined by rfalIsoDepFSx */ +#define RFAL_FEATURE_ISO_DEP_APDU_MAX_LEN 1024 /*!< ISO-DEP APDU max length. Please use multiples of I-Block max length */ + +#endif /* PLATFORM1_H */ + +