EasyLink layer¶
Overview¶
The EasyLink API should be used in application code. The EasyLink API is intended to abstract the RF Driver in order to give a simple API for customers to use as is or extend to suit their application[Use Cases]
General Behavior¶
Before using the EasyLink API the EasyLink Layer is initialized by calling
EasyLink_init()
. This initialises and opens the RF driver and
configures the modulation scheme passed to EasyLink_init.
The RX and TX can operate independently of each other.
RX is enabled by calling
EasyLink_receive()
or EasyLink_receiveAsync()
. Entering RX can
be immediate or scheduled by using the EasyLink_RxPacket::absTime
field.
EasyLink_receive()
is blocking and EasyLink_receiveAsync()
is
nonblocking. The EasyLink API does not queue messages so calling another API
function while in EasyLink_receiveAsync() will return
EasyLink_Status_Busy_Error
. An Asynchronous Rx operation can be cancelled with
EasyLink_abort()
.
TX is enabled by calling EasyLink_transmit()
or EasyLink_transmitAsync()
.
TX can be immediate or scheduled by using the EasyLink_TxPacket::absTime
field.
EasyLink_transmit()
is blocking and EasyLink_transmitAsync()
is nonblocking. The EasyLink API does not queue messages so calling another API
function while in EasyLink_transmitAsync()
will return EasyLink_Status_Busy_Error
An Asynchronous operation can be cancelled with EasyLink_abort()
.
Error Handling¶
The EasyLink API will return EasyLink_Status containing success or error code.
The EasyLink_Status code are:
Supported Functions¶
Generic API function | Description |
---|---|
EasyLink_init() |
Init’s and opens the RF driver and configures the specified modulation |
EasyLink_transmit() |
Blocking Transmit |
EasyLink_transmitAsync() |
Nonblocking Transmit |
EasyLink_receive() |
Blocking Receive |
EasyLink_receiveAsync() |
Nonblocking Receive |
EasyLink_abort() |
Aborts a non blocking call |
EasyLink_EnableRxAddrFilter() |
Enables/Disables RX filtering on the Addr |
EasyLink_GetIeeeAddr() |
Gets the IEEE Address |
EasyLink_SetFreq() |
Sets the frequency |
EasyLink_GetFreq() |
Gets the frequency |
EasyLink_SetRfPwr() |
Sets the Tx Power |
EasyLink_GetRfPwr() |
Gets the Tx Power |
Frame Structure¶
The EasyLink implements a basic header for transmitting and receiving data. This header supports addressing for a star or point-to-point network with acknowledgements.
Packet structure:
1B Length 1-64b Dst Address Payload