| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Typedefs | Functions
Teesl_NFC

## Typedefs
typedef struct TEES_NFCHandler * | TEES_NFCHandler

## Functions
TEE_Result | TEES_NFCInit (TEES_NFCHandler *handler)
| Initialize NFC device and set transfer parameters to `handler`. More...
void | TEES_NFCExit (TEES_NFCHandler handler)
| Terminate connection to NFC device. More...
TEE_Result | TEES_NFCWrite (TEES_NFCHandler handler, void *tx_buf, size_t len)
| Write data buffer `tx` to initialized NFC device. More...
TEE_Result | TEES_NFCRead (TEES_NFCHandler handler, char *rx_buf, size_t rx_buf_len, size_t *rsp_len)
| Read data buffer `rx` from initialized NFC device. More...
TEE_Result | TEES_NFCReadWait (TEES_NFCHandler handler, char *rx_buf, size_t rx_buf_len, size_t *rsp_len, int ms_timeout)
| Read data buffer `rx` from initialized NFC device. More...
TEE_Result | TEES_NFCSetMode (TEES_NFCHandler handler, unsigned long mode)
| Set NFC device mode. More...
TEE_Result | TEES_NFCWakeUp (TEES_NFCHandler handler)
| Send wake up command to initialized NFC device. More...
TEE_Result | TEES_NFCSleep (TEES_NFCHandler handler)
| Send sleep command to initialized NFC device. More...

## Detailed Description

## Typedef Documentation

TEES_NFCHandler

`#include <tee_nfc.h>`

Handler for NFC device.

## Function Documentation

void TEES_NFCExit | ( | TEES_NFCHandler | handler | ) |

`#include <tee_nfc.h>`

Terminate connection to NFC device.

Parameters

  [in] | handler | initialized parameters.

TEE_Result TEES_NFCInit | ( | TEES_NFCHandler * | handler | ) |

`#include <tee_nfc.h>`

Initialize NFC device and set transfer parameters to `handler`.

Parameters

  [out] | handler | Pointer to structure which contains set up parameters.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCRead | ( | TEES_NFCHandler | handler,
|  | char * | rx_buf,
|  | size_t | rx_buf_len,
|  | size_t * | rsp_len
| ) |  |

`#include <tee_nfc.h>`

Read data buffer `rx` from initialized NFC device.

Parameters

  [in] | handler | initialized parameters.
  [out] | rx_buf | is pointer to buffer to receive.
  [in] | rx_buf_len | is length of storage buffer for receiving.
  [out] | rsp_len | is pointer to store length of response data.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCReadWait | ( | TEES_NFCHandler | handler,
|  | char * | rx_buf,
|  | size_t | rx_buf_len,
|  | size_t * | rsp_len,
|  | int | ms_timeout
| ) |  |

`#include <tee_nfc.h>`

Read data buffer `rx` from initialized NFC device.

Parameters

  [in] | handler | initialized parameters.
  [out] | rx_buf | is pointer to buffer to receive.
  [in] | rx_buf_len | is length of storage buffer for receiving.
  [out] | rsp_len | is pointer to store length of response data.
  [in] | ms_timeout | time in millisecond during which data from nfc is expected.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCSetMode | ( | TEES_NFCHandler | handler,
|  | unsigned long | mode
| ) |  |

`#include <tee_nfc.h>`

Set NFC device mode.

Parameters

  [in] | handler | initialized parameters.
  [in] | mode | to set on NFC.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCSleep | ( | TEES_NFCHandler | handler | ) |

`#include <tee_nfc.h>`

Send sleep command to initialized NFC device.

Parameters

  [in] | handler | initialized parameters.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCWakeUp | ( | TEES_NFCHandler | handler | ) |

`#include <tee_nfc.h>`

Send wake up command to initialized NFC device.

Parameters

  [in] | handler | initialized parameters.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.

TEE_Result TEES_NFCWrite | ( | TEES_NFCHandler | handler,
|  | void * | tx_buf,
|  | size_t | len
| ) |  |

`#include <tee_nfc.h>`

Write data buffer `tx` to initialized NFC device.

Parameters

  [in] | handler | initialized parameters.
  [in] | tx_buf | is pointer to buffer to transfer.
  [in] | len | of buffer.

Return values

  TEE_SUCCESS | in case of success.
  TEE_ERROR_xxx | in case of errors.