Appiko
|
Configuration and management of S2-LP CSMA. More...
Go to the source code of this file.
Data Structures | |
struct | SCsmaInit |
S2LP CSMA Init structure definition. More... | |
Enumerations | |
enum | SCsmaPeriod { CSMA_PERIOD_64TBIT, CSMA_PERIOD_128TBIT, CSMA_PERIOD_256TBIT, CSMA_PERIOD_512TBIT } |
Multiplier for Tcca time enumeration (Tcca = Multiplier*Tbit). More... | |
Functions | |
void | S2LPCsmaInit (SCsmaInit *pxSCsmaInit) |
Initialize the S2LP CSMA according to the specified parameters in the SCsmaInit. More... | |
void | S2LPCsmaGetInfo (SCsmaInit *pxSCsmaInit) |
Return the fitted structure SCsmaInit starting from the registers values. More... | |
void | S2LPCsma (SFunctionalState xNewState) |
Enable or Disables the CSMA. More... | |
SFunctionalState | S2LPCsmaGetCsma (void) |
Gets the CSMA mode. Says if it is enabled or disabled. More... | |
void | S2LPCsmaPersistentMode (SFunctionalState xNewState) |
Enables or Disables the persistent CSMA mode. More... | |
SFunctionalState | S2LPCsmaGetPersistentMode (void) |
Gets the persistent CSMA mode. More... | |
void | S2LPCsmaSeedReloadMode (SFunctionalState xNewState) |
Enables or Disables the seed reload mode (if enabled it reloads the back-off generator seed using the value written in the BU_COUNTER_SEED register). More... | |
SFunctionalState | S2LPCsmaGetSeedReloadMode (void) |
Gets the seed reload mode. More... | |
void | S2LPCsmaSetBuCounterSeed (uint16_t nBuCounterSeed) |
Set the BU counter seed (BU_COUNTER_SEED register). The CSMA back off time is given by the formula: BO = rand(2^NB)*BU. More... | |
uint16_t | S2LPCsmaGetBuCounterSeed (void) |
Return the BU counter seed (BU_COUNTER_SEED register). More... | |
void | S2LPCsmaSetBuPrescaler (uint8_t cBuPrescaler) |
Set the BU prescaler. The CSMA back off time is given by the formula: BO = rand(2^NB)*BU. More... | |
uint8_t | S2LPCsmaGetBuPrescaler (void) |
Return the BU prescaler. More... | |
void | S2LPCsmaSetCcaPeriod (SCsmaPeriod xMultiplierTbit) |
Set the CCA period. More... | |
uint8_t | S2LPCsmaGetCcaPeriod (void) |
Return the CCA period. More... | |
void | S2LPCsmaSetCcaLength (uint8_t xCcaLength) |
Set the CCA length. More... | |
uint8_t | S2LPCsmaGetCcaLength (void) |
Return the CCA length. More... | |
void | S2LPCsmaSetMaxNumberBackoff (uint8_t cMaxNb) |
Set the max number of back-off. If reached S2LP stops the transmission. More... | |
uint8_t | S2LPCsmaGetMaxNumberBackoff (void) |
Return the max number of back-off. More... | |
The S2LP CSMA feature, when configured and enabled, is transparent for the user. It means the user has only to call the S2LPCsmaInit() function on a filled structure and then enable the CSMA policy using the S2LPCsma() function.
Example:
THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
THIS SOURCE CODE IS PROTECTED BY A LICENSE. FOR MORE INFORMATION PLEASE CAREFULLY READ THE LICENSE AGREEMENT FILE LOCATED IN THE ROOT DIRECTORY OF THIS FIRMWARE PACKAGE.
Definition in file S2LP_Csma.h.