10.3.2 PHY-DATA.confirm

This data confirm callback executes the function set by the upper layer at the initialization of the PL360 Host Controller (see Setting Callbacks). It is called when a transmission request is processed. The format of the function is:

typedef void (*pf_data_confirm_t)(tx_cfm_t *px_msg_cfm);

The result is reported in the following structure:

typedef struct tx_cfm {
   uint32_t ul_tx_time;
   uint32_t ul_rms_calc;
   enum mode_types uc_mod_type;
   enum tx_result_values uc_tx_result;
   enum buffer_id uc_buffer_id;
} tx_cfm_t;

Fields of the structure:

ul_tx_timeInstant when frame transmission started, referred to the internal 1 μs PHY counter
ul_rms_calcRMS_CALC value. It allows to estimate the voltage injected to the load
uc_mod_typePRIME mode type (related constants defined in PHY-DATA.request)
uc_tx_resultTransmission result (related constants defined below)
uc_buffer_idIdentifier of the buffer used for transmission (related constants defined in PHY-DATA.request)

Possible values of the field uc_tx_result are:

/* TX Result values */
enum tx_result_values {
   TX_RESULT_SUCCESS = 1,             /* Successful transmission */
   TX_RESULT_INV_LENGTH = 2,          /* Invalid length error */
   TX_RESULT_BUSY_CH = 3,             /* Busy channel error */
   TX_RESULT_BUSY_TX = 4,             /* Busy in transmission error */
   TX_RESULT_INV_SCHEME = 6,          /* Invalid modulation scheme error */
   TX_RESULT_TIMEOUT = 7,             /* Timeout error */
   TX_RESULT_INV_BUFFER = 8,          /* Invalid buffer identifier error */
   TX_RESULT_INV_MODE = 9,            /* Invalid PRIME Mode error */
   TX_RESULT_CANCELLED = 11,          /* Transmission cancelled */
   TX_RESULT_HIGH_TEMP_120 = 12,      /* High temperature (>120ºC) error (only with PL460) */
};