10.2.3 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_rms_calc;
   uint32_t ul_tx_time;
   enum tx_result_values uc_tx_result;
} tx_cfm_t;

Fields of the structure:

ul_rms_calcRMS_CALC value. It allows to estimate the voltage injected to the load
ul_tx_timeInstant when frame transmission ended, referred to the internal 1 μs PHY counter
uc_tx_resultTransmission result (related constants defined below)

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_BUSY_RX = 5,             /* Busy in reception error */
   TX_RESULT_INV_SCHEME = 6,          /* Invalid modulation scheme error */
   TX_RESULT_TIMEOUT = 7,             /* Timeout error */
   TX_RESULT_INV_TONEMAP = 8,         /* Invalid tone map error */
   TX_RESULT_INV_MODTYPE = 9,         /* Invalid modulation type error */
   TX_RESULT_INV_DT = 10,             /* Invalid delimiter type */
   TX_RESULT_CANCELLED = 11,          /* Transmission cancelled */
   TX_RESULT_HIGH_TEMP_120 = 12,      /* High temperature (>120ºC) error (only with PL460) */
};