2.3 PHY APIs
The following table lists the PHY Library APIs.
S. No. | API Name | Description | API Type |
---|---|---|---|
1 | PHY_TaskHandler() |
PHY Task handling This function,
| NA |
2 | PHY_Init() |
Initializes the PHY layer This function is called to initialize the PHY. The transceiver is initialized, interrupt handlers are set, Arbiter mode is initialized, the PHY PIBs are set to their default values and PHY state machine is set to PHY_IDLE state | Synchronous |
3 | PHY_Reset() | Resets the PHY state machine and sets the default PIB value if requested | Synchronous |
4 | PHY_EdStart(uint8_t scanDuration) | This function runs the ED scan for the scan duration specified. | Asynchronous |
5 | PHY_EdEndCallback(uint8_t eneryLevel) | User callback function for finished ED scan | NA |
6 | PHY_PibGet(uint8_t attribute, uint8_t * value) | This function is called to retrieve the transceiver information base attributes | Synchronous |
7 | PHY_PibSet(uint8_t attribute, PibValue_t *value) | This function is called to set the transceiver information base attributes | Synchronous |
8 | PHY_RxEnable(uint8_t state) |
Switches receiver on or off This function switches the receiver on (PHY_STATE_RX_ON) or off (PHY_STATE_TRX_OFF). | Asynchronous |
9 | PHY_RxFrameCallback(frame_info_t *rx_frame) | User call back function for frame reception | NA |
10 | PHY_TxFrame(PHY_FrameInfo_t *txFrame, PHY_CSMAMode_t csmaMode, bool performFrameRetry) |
Requests to PHY to transmit frame This function is called by the upper layer to deliver a frame to the PHY to be transmitted by the transceiver. | Asynchronous |
11 | PHY_TxDoneCallback(PHY_Retval_t status, PHY_FrameInfo_t *frame) | User call back function for frame transmission | NA |
12 | PHY_TrxSleep() | Sets the transceiver to sleep | Synchronous |
13 | PHY_TrxWakeup() | Wakes-up the transceiver from sleep | Synchronous |
14 | PHY_CCAPerform() |
Performs the CCA request This function performs a CCA request and returns the channel status as PHY_IDLE or PHY_BUSY | Synchronous |
15 | PHY_EdSample() | Performs Single ED measurement | Synchronous |
16 | PHY_ConfigRxSensitivity(uint8_t rxSensVal) | Sets the RX Sensitivity value in the Transceiver | Synchronous |
17 | PHY_StartContinuousTransmit() | Starts the continuous transmit in the Transceiver | Synchronous |
18 | PHY_StopContinuousTransmit() | Stops the continuous transmit in the Transceiver | Synchronous |
19 | PHY_ConfigTxPwr(uint8_t txPower) | Sets the Tx power in Transceiver | Synchronous |
20 | PHY_ConfigAntennaDiversity(bool div_ctrl, uint8_t ant_ctrl) | Enables/Disables the Antenna Diversity and sets the Antenna to be used for Transmission | Synchronous |
21 | PHY_ConfigRxRPCMode() | Enables the Receiver RPC (Reduced Power Consumption) mode | Synchronous |
22 | PHY_ConfigRxPromiscuousMode() | Enables Rx Promiscuous mode | Synchronous |
23 | PHY_ConfigAutoAck() | Enable/Disables the Automatic Acknowledgment after reception | Synchronous |
24 | PHY_ConfigReservedFrameFiltering() | Configures TRX for receiving reserved frame | Synchronous |
25 | PHY_GetTrxConfig() | To read a current setting of particular transceiver parameter | Synchronous |
26 | PHY_GetTrxStatus() | Returns the current status of the Transceiver | Synchronous |
27 | PHY_GetRSSIBaseVal() | Get RSSI base value of TRX | Synchronous |
28 | PHY_GetSWVersion() | To Get the current Software version of PHY | Synchronous |
29 | PHY_ConvertTxPwrRegValToDbm | To convert the Tx Power Register index value to dbm value | Synchronous |
30 | PHY_IsFramePendingFromNextLayer | To check whether any frame is pending from higher layer upon reception of data request command frame (Ex: MAC/APP). | Synchronous |