p3 fin
This commit is contained in:
83
P3_SETR2/Components/m24sr/Release_Notes.html
Normal file
83
P3_SETR2/Components/m24sr/Release_Notes.html
Normal file
@@ -0,0 +1,83 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="generator" content="pandoc" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||
<title>Release Notes for M24SR Component Drivers</title>
|
||||
<style type="text/css">
|
||||
code{white-space: pre-wrap;}
|
||||
span.smallcaps{font-variant: small-caps;}
|
||||
span.underline{text-decoration: underline;}
|
||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||
</style>
|
||||
<link rel="stylesheet" href="../../../../_htmresc/mini-st.css" />
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body>
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-lg-4">
|
||||
<div class="card fluid">
|
||||
<div class="sectione dark">
|
||||
<center>
|
||||
<h1 id="release-notes-for-m24sr-component-drivers"><small>Release Notes for</small> <mark>M24SR Component Drivers</mark></h1>
|
||||
<p>Copyright © 2017 STMicroelectronics<br />
|
||||
</p>
|
||||
<a href="https://www.st.com" class="logo"><img src="../../../../_htmresc/st_logo.png" alt="ST logo" /></a>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<h1 id="license">License</h1>
|
||||
<p>Licensed by ST under BSD 3-Clause license (the "License"). You may not use this package except in compliance with the License. You may obtain a copy of the License at:</p>
|
||||
<p><a href="https://opensource.org/licenses/BSD-3-Clause">https://opensource.org/licenses/BSD-3-Clause</a></p>
|
||||
<h1 id="purpose">Purpose</h1>
|
||||
<p>This directory contains the M24SR component drivers.</p>
|
||||
</div>
|
||||
<div class="col-sm-12 col-lg-8">
|
||||
<h1 id="update-history">Update History</h1>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section22" checked aria-hidden="true"> <label for="collapse-section22" aria-hidden="true">V1.1.1 / 03-April-2019</label>
|
||||
<div>
|
||||
<h2 id="main-changes">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Update release notes format</li>
|
||||
<li>Reformat the BSD 3-Clause license declaration in the files header (replace license terms by a web reference to OSI website where those terms lie)</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section20" aria-hidden="true"> <label for="collapse-section20" aria-hidden="true">V1.1.0 / 21-April-2017</label>
|
||||
<div>
|
||||
<h2 id="main-changes-1">Main Changes</h2>
|
||||
<ul>
|
||||
<li>Calls BSP IO functions (NFC_IO_xxx) as unique low layer interface.</li>
|
||||
<li>Made it fully independent by board and device (no external inclusion).</li>
|
||||
<li>Adapt #defines and m24sr.h accordingly API.</li>
|
||||
<li>Types renaming uc8 -> uint8_t and uc16 -> uint16_t.</li>
|
||||
<li>Pass I2C device address as param to all functions that use it.</li>
|
||||
<li>Remove goto instructions.</li>
|
||||
<li>Moved here some functions: M24SR_RFConfig(), M24SR_SetI2CSynchroMode(), M24SR_IsAnswerReady().</li>
|
||||
<li>Added M24SR_GPO_Callback().</li>
|
||||
<li>Added M24SR_GPO_Callback().</li>
|
||||
<li>Move lib_M24SR.c/h from driver to application.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse">
|
||||
<input type="checkbox" id="collapse-section19" aria-hidden="true"> <label for="collapse-section19" aria-hidden="true">V1.0.0 / 20-October-2014</label>
|
||||
<div>
|
||||
<h2 id="main-changes-2">Main Changes</h2>
|
||||
<ul>
|
||||
<li>First official release by STM MMY division</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky">
|
||||
For complete documentation on <mark>STM32 Microcontrollers</mark> , visit: <a href="http://www.st.com/STM32">http://www.st.com/STM32</a>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
1638
P3_SETR2/Components/m24sr/m24sr.c
Normal file
1638
P3_SETR2/Components/m24sr/m24sr.c
Normal file
File diff suppressed because it is too large
Load Diff
157
P3_SETR2/Components/m24sr/m24sr.h
Normal file
157
P3_SETR2/Components/m24sr/m24sr.h
Normal file
@@ -0,0 +1,157 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file m24sr.h
|
||||
* @author MCD Application Team
|
||||
* @brief This file provides a set of functions needed to manage M24SR
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© Copyright (c) 2017 STMicroelectronics.
|
||||
* All rights reserved.</center></h2>
|
||||
*
|
||||
* This software component is licensed by ST under BSD 3-Clause license,
|
||||
* the "License"; You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at:
|
||||
* opensource.org/licenses/BSD-3-Clause
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __M24SR_H
|
||||
#define __M24SR_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stdint.h"
|
||||
|
||||
/** @addtogroup BSP
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup Component
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup M24SR
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup M24SR_Exported_Constants M24SR Exported Constants
|
||||
* @{
|
||||
*/
|
||||
/* NFC IO specific config parameters */
|
||||
#define NFC_IO_STATUS_SUCCESS (uint16_t) 0x0000
|
||||
#define NFC_IO_ERROR_TIMEOUT (uint16_t) 0x0011
|
||||
#define NFC_IO_TRIALS (uint32_t) 1 /* In case M24SR will reply ACK failed allow to perform retry */
|
||||
|
||||
/* Status and error code -----------------------------------------------------*/
|
||||
#define M24SR_ACTION_COMPLETED (uint16_t) 0x9000
|
||||
#define M24SR_STATUS_SUCCESS (uint16_t) 0x0000
|
||||
#define M24SR_ERROR_DEFAULT (uint16_t) 0x0010
|
||||
#define M24SR_ERROR_TIMEOUT (uint16_t) 0x0011
|
||||
#define M24SR_ERROR_CRC (uint16_t) 0x0012
|
||||
#define M24SR_ERROR_NACK (uint16_t) 0x0013
|
||||
#define M24SR_ERROR_PARAMETER (uint16_t) 0x0014
|
||||
#define M24SR_ERROR_NBATEMPT (uint16_t) 0x0015
|
||||
#define M24SR_ERROR_NOACKNOWLEDGE (uint16_t) 0x0016
|
||||
|
||||
#define M24SR_ANSWER_TIMEOUT (uint32_t) 80 /* Timeout used by the component function NFC_IO_IsDeviceReady() */
|
||||
#define M24SR_ANSWER_STABLE (uint8_t) 5 /* Loop repetition used by the component function NFC_IO_IsDeviceReady() */
|
||||
|
||||
|
||||
/*-------------------------- GPO_Mode ----------------------------*/
|
||||
#define M24SR_GPO_POLLING (uint8_t) 0x00 /* Normal I²C polling */
|
||||
#define M24SR_GPO_SYNCHRO (uint8_t) 0x01 /* allow to use GPO polling as I2C synchronization */
|
||||
#define M24SR_GPO_INTERRUPT (uint8_t) 0x02 /* allow to use GPO interrupt as I2C synchronization */
|
||||
|
||||
|
||||
/*-------------------------- Password_Management ----------------------------*/
|
||||
#define M24SR_READ_PWD (uint16_t) 0x0001
|
||||
#define M24SR_WRITE_PWD (uint16_t) 0x0002
|
||||
#define M24SR_I2C_PWD (uint16_t) 0x0003
|
||||
|
||||
/*-------------------------- Verify command answer ----------------------------*/
|
||||
#define M24SR_PWD_NOT_NEEDED (uint16_t) 0x9000
|
||||
#define M24SR_PWD_NEEDED (uint16_t) 0x6300
|
||||
#define M24SR_PWD_CORRECT (uint16_t) 0x9000
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup M24SR_Exported_FunctionsPrototypes M24SR Exported FunctionsPrototypes
|
||||
* @{
|
||||
*/
|
||||
/* public function --------------------------------------------------------------------------*/
|
||||
void M24SR_Init (uint16_t DeviceAddr, uint8_t GpoMode);
|
||||
uint16_t M24SR_GetSession (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_KillSession (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_Deselect (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_SelectApplication (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_SelectCCfile (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_SelectNDEFfile (uint16_t DeviceAddr, uint16_t NDEFfileId);
|
||||
uint16_t M24SR_SelectSystemfile (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_ReadBinary (uint16_t DeviceAddr, uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead);
|
||||
uint16_t M24SR_STReadBinary (uint16_t DeviceAddr, uint16_t Offset, uint8_t NbByteToRead, uint8_t *pBufferRead);
|
||||
uint16_t M24SR_UpdateBinary (uint16_t DeviceAddr, uint16_t Offset, uint8_t NbByteToWrite, uint8_t *pDataToWrite);
|
||||
uint16_t M24SR_Verify (uint16_t DeviceAddr, uint16_t uPwdId, uint8_t NbPwdByte, uint8_t *pPwd);
|
||||
uint16_t M24SR_ChangeReferenceData (uint16_t DeviceAddr, uint16_t uPwdId, uint8_t *pPwd);
|
||||
uint16_t M24SR_EnableVerificationRequirement (uint16_t DeviceAddr, uint16_t uReadOrWrite);
|
||||
uint16_t M24SR_DisableVerificationRequirement (uint16_t DeviceAddr, uint16_t uReadOrWrite);
|
||||
uint16_t M24SR_EnablePermanentState (uint16_t DeviceAddr, uint16_t uReadOrWrite);
|
||||
uint16_t M24SR_DisablePermanentState (uint16_t DeviceAddr, uint16_t uReadOrWrite);
|
||||
uint16_t M24SR_SendInterrupt (uint16_t DeviceAddr);
|
||||
uint16_t M24SR_StateControl (uint16_t DeviceAddr, uint8_t uSetOrReset);
|
||||
uint16_t M24SR_ManageI2CGPO (uint16_t DeviceAddr, uint8_t GPO_I2Cconfig);
|
||||
uint16_t M24SR_ManageRFGPO (uint16_t DeviceAddr, uint8_t GPO_RFconfig);
|
||||
void M24SR_RFConfig (uint8_t OnOffChoice);
|
||||
void M24SR_GPO_Callback (void );
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
/** @defgroup M24SR_Imported_Functions M24SR Imported Functions
|
||||
* @{
|
||||
*/
|
||||
/* IO functions */
|
||||
extern void NFC_IO_Init(uint8_t GpoIrqEnable);
|
||||
extern void NFC_IO_DeInit(void);
|
||||
extern uint16_t NFC_IO_ReadMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length );
|
||||
extern uint16_t NFC_IO_WriteMultiple (uint8_t Addr, uint8_t *pBuffer, uint16_t Length);
|
||||
extern uint16_t NFC_IO_IsDeviceReady (uint8_t Addr, uint32_t Trials);
|
||||
extern void NFC_IO_ReadState(uint8_t * pPinState);
|
||||
extern void NFC_IO_RfDisable(uint8_t PinState);
|
||||
extern void NFC_IO_Delay(uint32_t Delay);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __M24SR_H */
|
||||
|
||||
|
||||
|
||||
|
||||
/******************* (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
Reference in New Issue
Block a user