Ben Katz / mbed-dev-f303

Dependents:   Hobbyking_Cheetah_Compact Hobbyking_Cheetah_Compact_DRV8323_14bit Hobbyking_Cheetah_Compact_DRV8323_V51_201907 HKC_MiniCheetah ... more

Fork of mbed-dev by mbed official

Committer:
benkatz
Date:
Mon Jul 30 20:31:44 2018 +0000
Revision:
181:36facd806e4a
Parent:
154:37f96f9d4de2
going on the robot.  fixed a dumb bug in float_to_uint

Who changed what in which revision?

UserRevisionLine numberNew contents of line
<> 154:37f96f9d4de2 1 /*
<> 154:37f96f9d4de2 2 * Copyright (c) 2015-2016, Freescale Semiconductor, Inc.
<> 154:37f96f9d4de2 3 * All rights reserved.
<> 154:37f96f9d4de2 4 *
<> 154:37f96f9d4de2 5 * Redistribution and use in source and binary forms, with or without modification,
<> 154:37f96f9d4de2 6 * are permitted provided that the following conditions are met:
<> 154:37f96f9d4de2 7 *
<> 154:37f96f9d4de2 8 * o Redistributions of source code must retain the above copyright notice, this list
<> 154:37f96f9d4de2 9 * of conditions and the following disclaimer.
<> 154:37f96f9d4de2 10 *
<> 154:37f96f9d4de2 11 * o Redistributions in binary form must reproduce the above copyright notice, this
<> 154:37f96f9d4de2 12 * list of conditions and the following disclaimer in the documentation and/or
<> 154:37f96f9d4de2 13 * other materials provided with the distribution.
<> 154:37f96f9d4de2 14 *
<> 154:37f96f9d4de2 15 * o Neither the name of Freescale Semiconductor, Inc. nor the names of its
<> 154:37f96f9d4de2 16 * contributors may be used to endorse or promote products derived from this
<> 154:37f96f9d4de2 17 * software without specific prior written permission.
<> 154:37f96f9d4de2 18 *
<> 154:37f96f9d4de2 19 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
<> 154:37f96f9d4de2 20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
<> 154:37f96f9d4de2 21 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
<> 154:37f96f9d4de2 22 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
<> 154:37f96f9d4de2 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
<> 154:37f96f9d4de2 24 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
<> 154:37f96f9d4de2 25 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
<> 154:37f96f9d4de2 26 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<> 154:37f96f9d4de2 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
<> 154:37f96f9d4de2 28 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<> 154:37f96f9d4de2 29 */
<> 154:37f96f9d4de2 30
<> 154:37f96f9d4de2 31 #ifndef _FSL_SMARTCARD_PHY_EMVSIM_H_
<> 154:37f96f9d4de2 32 #define _FSL_SMARTCARD_PHY_EMVSIM_H_
<> 154:37f96f9d4de2 33
<> 154:37f96f9d4de2 34 #include "fsl_smartcard.h"
<> 154:37f96f9d4de2 35
<> 154:37f96f9d4de2 36 /*!
<> 154:37f96f9d4de2 37 * @addtogroup smartcard_phy_emvsim_driver
<> 154:37f96f9d4de2 38 * @{
<> 154:37f96f9d4de2 39 */
<> 154:37f96f9d4de2 40
<> 154:37f96f9d4de2 41
<> 154:37f96f9d4de2 42 /*******************************************************************************
<> 154:37f96f9d4de2 43 * Definitions
<> 154:37f96f9d4de2 44 ******************************************************************************/
<> 154:37f96f9d4de2 45
<> 154:37f96f9d4de2 46 /*! @brief Smart card define which specifies the adjustment number of clock cycles during which an ATR string has to be received.
<> 154:37f96f9d4de2 47 */
<> 154:37f96f9d4de2 48 #define SMARTCARD_ATR_DURATION_ADJUSTMENT (360u)
<> 154:37f96f9d4de2 49
<> 154:37f96f9d4de2 50 /*! @brief Smart card define which specifies the adjustment number of clock cycles until an initial 'TS' character has to be
<> 154:37f96f9d4de2 51 * received. */
<> 154:37f96f9d4de2 52 #define SMARTCARD_INIT_DELAY_CLOCK_CYCLES_ADJUSTMENT (4200u)
<> 154:37f96f9d4de2 53
<> 154:37f96f9d4de2 54 /*******************************************************************************
<> 154:37f96f9d4de2 55 * API
<> 154:37f96f9d4de2 56 ******************************************************************************/
<> 154:37f96f9d4de2 57
<> 154:37f96f9d4de2 58 #if defined(__cplusplus)
<> 154:37f96f9d4de2 59 extern "C" {
<> 154:37f96f9d4de2 60 #endif
<> 154:37f96f9d4de2 61
<> 154:37f96f9d4de2 62 /*!
<> 154:37f96f9d4de2 63 * @brief Fills in the smartcardInterfaceConfig structure with default values.
<> 154:37f96f9d4de2 64 *
<> 154:37f96f9d4de2 65 * @param config The user configuration structure of type smartcard_interface_config_t.
<> 154:37f96f9d4de2 66 * Function fill in members:
<> 154:37f96f9d4de2 67 * clockToResetDelay = 42000,
<> 154:37f96f9d4de2 68 * vcc = kSmartcardVoltageClassB3_3V,
<> 154:37f96f9d4de2 69 * with default values.
<> 154:37f96f9d4de2 70 */
<> 154:37f96f9d4de2 71 void SMARTCARD_PHY_EMVSIM_GetDefaultConfig(smartcard_interface_config_t *config);
<> 154:37f96f9d4de2 72
<> 154:37f96f9d4de2 73 /*!
<> 154:37f96f9d4de2 74 * @brief Configures a Smart card interface.
<> 154:37f96f9d4de2 75 *
<> 154:37f96f9d4de2 76 * @param base The Smart card peripheral module base address.
<> 154:37f96f9d4de2 77 * @param config The user configuration structure of type smartcard_interface_config_t. The user
<> 154:37f96f9d4de2 78 * is responsible to fill out the members of this structure and to pass the pointer of this structure
<> 154:37f96f9d4de2 79 * into this function or call SMARTCARD_PHY_EMVSIMInitUserConfigDefault to fill out structure with default values.
<> 154:37f96f9d4de2 80 * @param srcClock_Hz Smart card clock generation module source clock.
<> 154:37f96f9d4de2 81 *
<> 154:37f96f9d4de2 82 * @retval kStatus_SMARTCARD_Success or kStatus_SMARTCARD_OtherError for an error.
<> 154:37f96f9d4de2 83 */
<> 154:37f96f9d4de2 84 status_t SMARTCARD_PHY_EMVSIM_Init(EMVSIM_Type *base, const smartcard_interface_config_t *config, uint32_t srcClock_Hz);
<> 154:37f96f9d4de2 85
<> 154:37f96f9d4de2 86 /*!
<> 154:37f96f9d4de2 87 * @brief De-initializes a Smart card interface, stops the Smart card clock, and disables the VCC.
<> 154:37f96f9d4de2 88 *
<> 154:37f96f9d4de2 89 * @param base Smart card peripheral module base address.
<> 154:37f96f9d4de2 90 * @param config Smart card configuration structure.
<> 154:37f96f9d4de2 91 */
<> 154:37f96f9d4de2 92 void SMARTCARD_PHY_EMVSIM_Deinit(EMVSIM_Type *base, const smartcard_interface_config_t *config);
<> 154:37f96f9d4de2 93
<> 154:37f96f9d4de2 94 /*!
<> 154:37f96f9d4de2 95 * @brief Activates the Smart card IC.
<> 154:37f96f9d4de2 96 *
<> 154:37f96f9d4de2 97 * @param base The EMVSIM peripheral base address.
<> 154:37f96f9d4de2 98 * @param context A pointer to a Smart card driver context structure.
<> 154:37f96f9d4de2 99 * @param resetType type of reset to be performed, possible values
<> 154:37f96f9d4de2 100 * = kSmartcardColdReset, kSmartcardWarmReset
<> 154:37f96f9d4de2 101 *
<> 154:37f96f9d4de2 102 * @retval kStatus_SMARTCARD_Success or kStatus_SMARTCARD_OtherError for an error.
<> 154:37f96f9d4de2 103 */
<> 154:37f96f9d4de2 104 status_t SMARTCARD_PHY_EMVSIM_Activate(EMVSIM_Type *base,
<> 154:37f96f9d4de2 105 smartcard_context_t *context,
<> 154:37f96f9d4de2 106 smartcard_reset_type_t resetType);
<> 154:37f96f9d4de2 107
<> 154:37f96f9d4de2 108 /*!
<> 154:37f96f9d4de2 109 * @brief De-activates the Smart card IC.
<> 154:37f96f9d4de2 110 *
<> 154:37f96f9d4de2 111 * @param base The EMVSIM peripheral base address.
<> 154:37f96f9d4de2 112 * @param context A pointer to a Smart card driver context structure.
<> 154:37f96f9d4de2 113 *
<> 154:37f96f9d4de2 114 * @retval kStatus_SMARTCARD_Success or kStatus_SMARTCARD_OtherError for an error.
<> 154:37f96f9d4de2 115 */
<> 154:37f96f9d4de2 116 status_t SMARTCARD_PHY_EMVSIM_Deactivate(EMVSIM_Type *base, smartcard_context_t *context);
<> 154:37f96f9d4de2 117
<> 154:37f96f9d4de2 118 /*!
<> 154:37f96f9d4de2 119 * @brief Controls the Smart card interface IC.
<> 154:37f96f9d4de2 120 *
<> 154:37f96f9d4de2 121 * @param base The EMVSIM peripheral base address.
<> 154:37f96f9d4de2 122 * @param context A pointer to a Smart card driver context structure.
<> 154:37f96f9d4de2 123 * @param control A interface command type.
<> 154:37f96f9d4de2 124 * @param param Integer value specific to control type
<> 154:37f96f9d4de2 125 *
<> 154:37f96f9d4de2 126 * @retval kStatus_SMARTCARD_Success or kStatus_SMARTCARD_OtherError for an error.
<> 154:37f96f9d4de2 127 */
<> 154:37f96f9d4de2 128 status_t SMARTCARD_PHY_EMVSIM_Control(EMVSIM_Type *base,
<> 154:37f96f9d4de2 129 smartcard_context_t *context,
<> 154:37f96f9d4de2 130 smartcard_interface_control_t control,
<> 154:37f96f9d4de2 131 uint32_t param);
<> 154:37f96f9d4de2 132 /*@}*/
<> 154:37f96f9d4de2 133
<> 154:37f96f9d4de2 134 #if defined(__cplusplus)
<> 154:37f96f9d4de2 135 }
<> 154:37f96f9d4de2 136 #endif
<> 154:37f96f9d4de2 137
<> 154:37f96f9d4de2 138 /*! @}*/
<> 154:37f96f9d4de2 139
<> 154:37f96f9d4de2 140 #endif /* _FSL_SMARTCARD_PHY_EMVSIM_H_*/