armapi
v1.0
bĂȘta
|
Macros | |
#define | ARM_FSK_BROADCAST 255 |
Constant to define the broadcast value. More... | |
#define | ARM_FSK_POWER_AUTO (-127) |
Constant to define the auto power value. More... | |
Typedefs | |
typedef enum armFskWor_e | armFskWor_t |
Constant to define the WOR mode 'Wake On Radio'. More... | |
typedef enum armFskLbtAfa_e | armFskLbtAfa_t |
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'. More... | |
Enumerations | |
enum | armFskWor_e { ARM_FSK_WOR_DISABLE, ARM_FSK_WOR_LP, ARM_FSK_WOR_CS, ARM_FSK_WOR_PQT } |
Constant to define the WOR mode 'Wake On Radio'. More... | |
enum | armFskLbtAfa_e { ARM_FSK_LBTAFA_DISABLE, ARM_FSK_LBTAFA_LBT, ARM_FSK_LBTAFA_AFA, ARM_FSK_LBTAFA_LBTAFA } |
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'. More... | |
Functions | |
int8_t | armFskMaxPower (uint16_t radioChannel, armBaudrate_t radioBaud) |
Get The maximal possible power. More... | |
armError_t | armFskSetRadio (arm_t *arm, uint16_t channel, armBaudrate_t baud, int8_t power) |
Setup the Fsk (local) radio configuration. More... | |
void | armFskGetRadio (arm_t *arm, uint16_t *channel, armBaudrate_t *baud, int8_t *power) |
Get the fsk (local) radio configuration. More... | |
armError_t | armFskSetRemoteAdd (arm_t *arm, uint8_t add) |
Set the radio remote address. More... | |
uint8_t | armFskGetRemoteAdd (arm_t *arm) |
Get the remote address. More... | |
armError_t | armFskSetLocalAdd (arm_t *arm, uint8_t add) |
Set the radio local address. More... | |
uint8_t | armFskGetLocalAdd (arm_t *arm) |
Get the local address. More... | |
void | armFskEnableAddressing (arm_t *arm, bool enable) |
Enable/Disable Addressing. More... | |
bool | armFskIsEnableAddressing (arm_t *arm) |
Get enable Addressing. More... | |
void | armFskEnableCrc (arm_t *arm, bool enable) |
Enable/Disable CRC. More... | |
bool | armFskIsEnableCrc (arm_t *arm) |
Get enable CRC. More... | |
armError_t | armFskEnableInfinityMode (arm_t *arm, bool enable) |
Enable/Disable Infinity mode. More... | |
bool | armFskIsEnableInfinityMode (arm_t *arm) |
Get enable Infinity mode. More... | |
void | armFskEnableWhitening (arm_t *arm, bool enable) |
Enable/Disable Whitening. More... | |
bool | armFskIsEnableWhitening (arm_t *arm) |
Get enable Whitening. More... | |
armError_t | armFskSetWorMode (arm_t *arm, armFskWor_t mode, uint16_t periodTime, uint16_t postTime, int8_t rssiLevel, bool filterLongPreamble) |
Enable/Disable and configure the wake on radio mode. More... | |
void | armFskGetWorMode (arm_t *arm, armFskWor_t *mode, uint16_t *periodTime, uint16_t *postTime, int8_t *rssiLevel, bool *filterLongPreamble) |
Get the wake on radio mode configuration. More... | |
armError_t | armFskSetLbtAfaMode (arm_t *arm, armFskLbtAfa_t mode, int8_t rssiLevel, uint16_t nSamples, uint16_t channel2) |
Enable/Disable and configure the Lbt&Afa mode. More... | |
void | armFskGetLbtAfaMode (arm_t *arm, armFskLbtAfa_t *mode, int8_t *rssiLevel, uint16_t *nSamples, uint16_t *channel2) |
Get the wake up on mode configuration. More... | |
#define ARM_FSK_BROADCAST 255 |
Constant to define the broadcast value.
Value for parameter armFskSetRemoteAdd() function.
#define ARM_FSK_POWER_AUTO (-127) |
Constant to define the auto power value.
Value for parameter power
of armFskSetRemoteAdd() function.
typedef enum armFskLbtAfa_e armFskLbtAfa_t |
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.
typedef enum armFskWor_e armFskWor_t |
Constant to define the WOR mode 'Wake On Radio'.
enum armFskLbtAfa_e |
Constant to define the LBT&AFA mode 'Listen before talk' and 'Adaptive Frequency Agility'.
enum armFskWor_e |
Constant to define the WOR mode 'Wake On Radio'.
void armFskEnableAddressing | ( | arm_t * | arm, |
bool | enable | ||
) |
Enable/Disable Addressing.
This function is supported by:
arm | Pointer to your ARM structure. |
enable | true to enable Addressing or false to disable. |
void armFskEnableCrc | ( | arm_t * | arm, |
bool | enable | ||
) |
Enable/Disable CRC.
This function is supported by:
arm | Pointer to your ARM structure. |
enable | true to enable CRC or false to disable. |
armError_t armFskEnableInfinityMode | ( | arm_t * | arm, |
bool | enable | ||
) |
Enable/Disable Infinity mode.
This function is supported by:
arm | Pointer to your ARM structure. |
enable | true to enable Infinity mode or false to disable. |
void armFskEnableWhitening | ( | arm_t * | arm, |
bool | enable | ||
) |
Enable/Disable Whitening.
This function is supported by:
arm | Pointer to your ARM structure. |
enable | true to enable Whitening false to disable. |
void armFskGetLbtAfaMode | ( | arm_t * | arm, |
armFskLbtAfa_t * | mode, | ||
int8_t * | rssiLevel, | ||
uint16_t * | nSamples, | ||
uint16_t * | channel2 | ||
) |
Get the wake up on mode configuration.
Please, for more information about parameters consult the documentation of the armFskSetLbtAfaMode() function.
This function is supported by:
arm | Pointer to your ARM structure. |
mode | If the pointer is valid, the mode is set. |
rssiLevel | If the pointer is valid, the rssiLevel is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable. |
nSamples | If the pointer is valid, the nSamples is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable. |
channel2 | If the pointer is valid, the channel2 is set. If the mode is ARM_FSK_LBTAFA_DISABLE the value is not workable. |
uint8_t armFskGetLocalAdd | ( | arm_t * | arm | ) |
Get the local address.
This function is supported by:
arm | Pointer to your ARM structure. |
void armFskGetRadio | ( | arm_t * | arm, |
uint16_t * | channel, | ||
armBaudrate_t * | baud, | ||
int8_t * | power | ||
) |
Get the fsk (local) radio configuration.
Please, for more information about parameter consult the documentation of the armFskSetRadio() function.
This function is supported by:
arm | Pointer to your ARM structure. |
channel | If the pointer is valid, the channel is set. |
baud | If the pointer is valid, the baud is set. If ARM_BAUDRATE_NONE is set, there is probably a error. |
power | If the pointer is valid, the power is set. If the power is no particularity specified, the ARM_FSK_POWER_AUTO value is set. |
uint8_t armFskGetRemoteAdd | ( | arm_t * | arm | ) |
Get the remote address.
This function is supported by:
arm | Pointer to your ARM structure. |
void armFskGetWorMode | ( | arm_t * | arm, |
armFskWor_t * | mode, | ||
uint16_t * | periodTime, | ||
uint16_t * | postTime, | ||
int8_t * | rssiLevel, | ||
bool * | filterLongPreamble | ||
) |
Get the wake on radio mode configuration.
Please, for more information about parameters consult the documentation of the armFskSetWorMode() function.
This function is supported by:
arm | Pointer to your ARM structure. |
mode | If the pointer is valid, the mode is set. |
periodTime | If the pointer is valid, the periodTime is set. If the mode is ARM_FSK_WOR_DISABLE the value is not workable. |
postTime | If the pointer is valid, the postTime is set. If the mode is ARM_FSK_WOR_DISABLE the value is not workable. |
rssiLevel | If the pointer is valid, the rssiLevel is set. If the mode is not ARM_FSK_WOR_CS the value is not workable. |
filterLongPreamble | If the pointer is valid, the filterLongPreamble is set. If the mode is ARM_FSK_WOR_DISABLE or ARM_FSK_WOR_LP the value is not workable. |
bool armFskIsEnableAddressing | ( | arm_t * | arm | ) |
Get enable Addressing.
This function is supported by:
arm | Pointer to your ARM structure. |
bool armFskIsEnableCrc | ( | arm_t * | arm | ) |
Get enable CRC.
This function is supported by:
arm | Pointer to your ARM structure. |
bool armFskIsEnableInfinityMode | ( | arm_t * | arm | ) |
Get enable Infinity mode.
This function is supported by:
arm | Pointer to your ARM structure. |
bool armFskIsEnableWhitening | ( | arm_t * | arm | ) |
Get enable Whitening.
This function is supported by:
arm | Pointer to your ARM structure. |
int8_t armFskMaxPower | ( | uint16_t | radioChannel, |
armBaudrate_t | radioBaud | ||
) |
Get The maximal possible power.
Get the maximal possible power of function channel and baudrate. For more information, please consulate Fsk (Local) radio page.
radioChannel | The radio channel. |
radioBaud | The radio baudrate. |
armError_t armFskSetLbtAfaMode | ( | arm_t * | arm, |
armFskLbtAfa_t | mode, | ||
int8_t | rssiLevel, | ||
uint16_t | nSamples, | ||
uint16_t | channel2 | ||
) |
Enable/Disable and configure the Lbt&Afa mode.
mode
is not ARM_FSK_LBTAFA_DISABLE the rssiLevel
is the same register in ARM, so if change this value with this function, the rssiLevel
value of the WOR mode is also modified.This function is supported by:
arm | Pointer to your ARM structure. |
mode | The value available:
|
rssiLevel | This parameter in dBm is used by ARM_FSK_LBTAFA_AFA and ARM_FSK_LBTAFA_LBTAFA (the default value is -95) for define the level rssi who say if the channels is busy or not. |
nSamples | This is the number of rssi sample (the default value is 240). |
channel2 | The secondary channel, the primary channel (and the other radio parameters) must be set with armFskSetRadio() function.
|
channel2
of this function is link with the parameters of the function armFskSetRadio(). Is very important to chose the correct value. For more information, please consulate the main radio parameter page and the documentation of armFskSetRadio() function.armError_t armFskSetLocalAdd | ( | arm_t * | arm, |
uint8_t | add | ||
) |
Set the radio local address.
This function is supported by:
arm | Pointer to your ARM structure. |
add | Local address of 0 to 255. |
armError_t armFskSetRadio | ( | arm_t * | arm, |
uint16_t | channel, | ||
armBaudrate_t | baud, | ||
int8_t | power | ||
) |
Setup the Fsk (local) radio configuration.
For more information, please consulate Fsk (Local) radio page.
This function is supported by:
arm | Pointer to your ARM structure. |
channel | The main radio channel.
|
baud | The radio baudrate.
|
power | The radio output power.
|
armError_t armFskSetRemoteAdd | ( | arm_t * | arm, |
uint8_t | add | ||
) |
Set the radio remote address.
This function is supported by:
arm | Pointer to your ARM structure. |
add | Remote address of 0 to 255. The 255 value is used for broadcast, the macro ARM_FSK_BROADCAST (255) can be used in this case. |
armError_t armFskSetWorMode | ( | arm_t * | arm, |
armFskWor_t | mode, | ||
uint16_t | periodTime, | ||
uint16_t | postTime, | ||
int8_t | rssiLevel, | ||
bool | filterLongPreamble | ||
) |
Enable/Disable and configure the wake on radio mode.
mode
is ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT this function enable the wake up on uart (see armEnableWakeUpUart()) and change the serial baudrate if necessary. In other mode (and if ARMPORT_WITH_nSLEEP is not defined) this function disable the wake up on uart. mode
is ARM_FSK_WOR_CS the rssiLevel
is the same register in ARM, so if change this value with this function, the rssiLevel
value of the LBT is also modified.This function is supported by:
arm | Pointer to your ARM structure. |
mode | The value available:
|
periodTime | The period time in milliseconds.
|
postTime | The time in milliseconds where the WOR is disable.
|
rssiLevel | This parameter in dBm is used by ARM_FSK_WOR_CS (the default value is -95). In ARM_FSK_WOR_CS mode the wake up is generate by the rssi level. This Level is configurable by rssiLevel parameter. |
filterLongPreamble | In the case where mode is ARM_FSK_WOR_CS or ARM_FSK_WOR_PQT, if filterLongPreamble is true the receive frames with long preamble is not push on the serial port. |