![]() |
S2-LP Low Level API
v. 1.3.0
|
Functions | |
void | S2LPPktStackInit (PktStackInit *pxPktStackInit) |
Initialize the S2LP STack packet according to the specified parameters in the PktStackInit. More... | |
void | S2LPPktStackGetInfo (PktStackInit *pxPktStackInit) |
Return the S2LP STack packet structure according to the specified parameters in the registers. More... | |
void | S2LPPktStackAddressesInit (PktStackAddressesInit *pxPktStackAddresses) |
Initialize the S2LP STack packet addresses according to the specified parameters in the PktStackAddresses struct. More... | |
void | S2LPPktStackGetAddressesInfo (PktStackAddressesInit *pxPktStackAddresses) |
Return the S2LP STack packet addresses structure according to the specified parameters in the registers. More... | |
void | S2LPPktStackSetFormat (void) |
Configure the STack packet format for S2LP. More... | |
void | S2LPPktStackSetPayloadLength (uint16_t nPayloadLength) |
Set the payload length for S2LP STack packets. Since the packet length depends from the address (always 2 for this packet format) and the control field size, this function reads the control length register content in order to determine the correct packet length to be written. More... | |
uint16_t | S2LPPktStackGetPayloadLength (void) |
Return the payload length for S2LP STack packets. Since the packet length depends from the address and the control field size, this function reads the correspondent registers in order to determine the correct payload length to be returned. More... | |
void | S2LPPktStackAckRequest (SFunctionalState xNewState) |
This function will set the NO_ACK bit or reset it. More... | |
void | S2LPPktStackAutoAck (SFunctionalState xNewState) |
Se the AUTO_ACK bit on the receiver . More... | |
void | S2LPPktStackNRetx (uint8_t nRetx) |
Set the number of retransmissions to be done in case of ACK loss. More... | |
void | S2LPPktStackPiggybacking (SFunctionalState xNewState) |
Enable or Disable the piggybacking. More... | |
SFlagStatus | S2LPPktStackGetTXAckRequest (void) |
Get the NO_ACK bit. More... | |
uint8_t | S2LPPktStackGetNReTx (void) |
Returns the number of retransmission done on the transmitted packet. More... | |
void S2LPPktStackAckRequest | ( | SFunctionalState | xNewState | ) |
This function will set the NO_ACK bit or reset it.
xNewState | if it is S_DISABLE, the ack will be not request and thus the NO_ACK bit will be set to 1. if this parameter is S_ENABLE, the ack will be request and thus the NO_ACK bit will be set to 0. |
None. |
Definition at line 425 of file S2LP_PktStack.c.
void S2LPPktStackAddressesInit | ( | PktStackAddressesInit * | pxPktStackAddresses | ) |
Initialize the S2LP STack packet addresses according to the specified parameters in the PktStackAddresses struct.
pxPktStackAddresses | STack packet addresses init structure. This parameter is a pointer to PktStackAddressesInit . |
None. |
Definition at line 210 of file S2LP_PktStack.c.
void S2LPPktStackAutoAck | ( | SFunctionalState | xNewState | ) |
Se the AUTO_ACK bit on the receiver .
xNewState | if S_ENABLE, the receiver will check the NO_ACK bit to see if the ack should be sent (NO_ACK=0) or not (NO_ACK=1). |
None. |
Definition at line 369 of file S2LP_PktStack.c.
void S2LPPktStackGetAddressesInfo | ( | PktStackAddressesInit * | pxPktStackAddresses | ) |
Return the S2LP STack packet addresses structure according to the specified parameters in the registers.
pxPktStackAddresses | STack packet addresses init structure. This parameter is a pointer to PktStackAddresses. |
None. |
Definition at line 261 of file S2LP_PktStack.c.
void S2LPPktStackGetInfo | ( | PktStackInit * | pxPktStackInit | ) |
Return the S2LP STack packet structure according to the specified parameters in the registers.
pxPktStackInit | STack packet init structure. This parameter is a pointer to PktStackInit. |
None. |
Definition at line 165 of file S2LP_PktStack.c.
uint8_t S2LPPktStackGetNReTx | ( | void | ) |
Returns the number of retransmission done on the transmitted packet.
None. |
uint8_t | Number of retransmissions done until now. |
Definition at line 486 of file S2LP_PktStack.c.
uint16_t S2LPPktStackGetPayloadLength | ( | void | ) |
Return the payload length for S2LP STack packets. Since the packet length depends from the address and the control field size, this function reads the correspondent registers in order to determine the correct payload length to be returned.
None. |
uint16_t | Payload length. |
Definition at line 333 of file S2LP_PktStack.c.
SFlagStatus S2LPPktStackGetTXAckRequest | ( | void | ) |
Get the NO_ACK bit.
None. |
SFlagStatus | if it is S_SET, the ack will be not requested, otherwise it will be. |
Definition at line 409 of file S2LP_PktStack.c.
void S2LPPktStackInit | ( | PktStackInit * | pxPktStackInit | ) |
Initialize the S2LP STack packet according to the specified parameters in the PktStackInit.
pxPktStackInit | STack packet init structure. This parameter is a pointer to PktStackInit. |
None. |
Definition at line 83 of file S2LP_PktStack.c.
void S2LPPktStackNRetx | ( | uint8_t | nRetx | ) |
Set the number of retransmissions to be done in case of ACK loss.
nRetx | number of retransmissions. |
None. |
Definition at line 391 of file S2LP_PktStack.c.
void S2LPPktStackPiggybacking | ( | SFunctionalState | xNewState | ) |
Enable or Disable the piggybacking.
xNewState | enable or disable. |
None. |
Definition at line 447 of file S2LP_PktStack.c.
void S2LPPktStackSetFormat | ( | void | ) |
Configure the STack packet format for S2LP.
None. |
None. |
Definition at line 282 of file S2LP_PktStack.c.
void S2LPPktStackSetPayloadLength | ( | uint16_t | nPayloadLength | ) |
Set the payload length for S2LP STack packets. Since the packet length depends from the address (always 2 for this packet format) and the control field size, this function reads the control length register content in order to determine the correct packet length to be written.
nPayloadLength | payload length in bytes. This parameter can be any value of uint16_t. |
None. |
Definition at line 313 of file S2LP_PktStack.c.