ruuvi.drivers.c  ${PROJECT_VERSION}
Drivers for external sensors and peripherals on embedded systems.
nfc_t4t_lib.h File Reference
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include "sdk_errors.h"

Go to the source code of this file.

Macros

#define NFC_T4T_MAX_PAYLOAD_SIZE   0xFFF0U
 Emulation mode. More...
 

Typedefs

typedef void(* nfc_t4t_callback_t) (void *p_context, nfc_t4t_event_t event, const uint8_t *p_data, size_t data_length, uint32_t flags)
 Callback to pass events from NFCLib to application. More...
 

Enumerations

enum  nfc_t4t_emu_mode_t { NFC_T4T_EMUMODE_NDEF , NFC_T4T_EMUMODE_PICC }
 
enum  nfc_t4t_event_t {
  NFC_T4T_EVENT_NONE , NFC_T4T_EVENT_FIELD_ON , NFC_T4T_EVENT_FIELD_OFF , NFC_T4T_EVENT_NDEF_READ ,
  NFC_T4T_EVENT_NDEF_UPDATED , NFC_T4T_EVENT_DATA_TRANSMITTED , NFC_T4T_EVENT_DATA_IND
}
 
enum  nfc_t4t_data_ind_flags_t { NFC_T4T_DI_FLAG_NONE = 0x00 , NFC_T4T_DI_FLAG_MORE = 0x01 }
 
enum  nfc_t4t_param_id_t { NFC_T4T_PARAM_TESTING , NFC_T4T_PARAM_FWI , NFC_T4T_PARAM_SELRES , NFC_T4T_PARAM_NFCID1 }
 

Functions

ret_code_t nfc_t4t_setup (nfc_t4t_callback_t callback, void *p_context)
 Register the application callback for event signaling. More...
 
ret_code_t nfc_t4t_ndef_rwpayload_set (uint8_t *p_emulation_buffer, size_t buffer_length)
 Set emulation buffer and content for a NDEF Tag emulation that is Read/Writable. More...
 
ret_code_t nfc_t4t_ndef_staticpayload_set (const uint8_t *p_emulation_buffer, size_t buffer_length)
 Set emulationBuffer and Content for a NDEF Tag emulation that is Read-Only. More...
 
ret_code_t nfc_t4t_response_pdu_send (const uint8_t *p_pdu, size_t pdu_length)
 Send a raw response PDU after getting a Request PDU callback. More...
 
ret_code_t nfc_t4t_parameter_set (nfc_t4t_param_id_t id, void *p_data, size_t data_length)
 Set an NFC parameter. More...
 
ret_code_t nfc_t4t_parameter_get (nfc_t4t_param_id_t id, void *p_data, size_t *p_max_data_length)
 Query an NFC parameter value. More...
 
ret_code_t nfc_t4t_emulation_start (void)
 Activate the NFC frontend. More...
 
ret_code_t nfc_t4t_emulation_stop (void)
 Deactivate the NFC frontend. More...
 
ret_code_t nfc_t4t_done (void)
 Release reference to application callback. More...
 

Detailed Description

Copyright (c) 2016 - 2020, Telit Communications Cyprus Ltd

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form, except as embedded into a Nordic Semiconductor ASA integrated circuit in a product or a software update for such product, must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  3. Neither the name of Nordic Semiconductor ASA nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  4. This software, with or without modification, must only be used with a Nordic Semiconductor ASA integrated circuit.
  5. Any software provided in binary form under this license must not be reverse engineered, decompiled, modified and/or disassembled.

THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file nfc_t4t_lib.h.