ped.h File Reference
Last updated: 25-Feb-2025
Go to the source code of this file.
Macros |
|
#define | PED_OK 0 |
#define | PED_ERROR -1 |
#define | PED_ERR_LOAD -2 |
#define | PED_LINK_OK 0 |
#define | PED_NS_DONE 1 |
#define | PED_CERT_ERR 2 |
#define | PED_NS_ERR 3 |
Typedefs |
|
typedef int(* | ped_SendCallback) (const unsigned char *data, int len) |
typedef int(* | ped_RcvCallback) (unsigned char *data, int len) |
Functions |
|
int | ped_SetSendRcvCb (ped_SendCallback scbf, ped_RcvCallback rcbf) |
int | ped_Pairing (int *status) |
int | ped_MovePin (void) |
Detailed Description
This file defines the API for the PP1000 pairing and PIN transfer functionality which is part of technology selection library.
- Author
- Thomas Buening, GSS
Typedef Documentation
◆ ped_RcvCallback
typedef int(* ped_RcvCallback) (unsigned char *data, int len) |
Callback function application has to implement for receiving data from PED. If the received data is not a complete packet, the callback will be invoked again until the whole packet is received.
- Parameters
-
[out] data : received data [in] len : size of data buffer
- Returns
- number of bytes read, -1: failure
◆ ped_SendCallback
typedef int(* ped_SendCallback) (const unsigned char *data, int len) |
Callback function application has to implement for sending data to PED.
- Parameters
-
[in] data : Data to be sent [in] len : Length of data
- Returns
- number of bytes sent, -1: failure
Function Documentation
◆ ped_MovePin()
int ped_MovePin | ( | void | ) |
Move PIN from PED to CTP.
- Returns
-
- PED_OK : No error, PIN successfully moved
- PED_ERROR : Failure
- PED_ERR_LOAD : Error loading dynamic library
◆ ped_Pairing()
int ped_Pairing | ( | int * | status | ) |
Execute pairing between CTP and PED.
- Parameters
-
[out] status : additional status information, see PED status codes, may be NULL
- Returns
-
- PED_OK : No error, pairing successful
- PED_ERROR : Pairing failed
- PED_ERR_LOAD : Error loading dynamic library
◆ ped_SetSendRcvCb()
int ped_SetSendRcvCb | ( | ped_SendCallback | scbf, |
ped_RcvCallback | rcbf | ||
) |
Set send and receive callback functions for communication with PED. This function is for convenience. You can choose if to use this or directly use the equivalent function from pp1000 library, don't call both!
- PED_OK : Callback functions successfully registered
- PED_ERROR : Invalid parameter
- PED_ERR_LOAD : Error loading dynamic library
- Parameters
-
[in] scbf : Send callback function [in] rcbf : Receive callback function
Rate this article: