net/ieee802154: add PHY mode configuration
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
This commit is contained in:
parent
8183b1fe78
commit
0cd3deb74c
@ -26,6 +26,7 @@
|
|||||||
|
|
||||||
#include "byteorder.h"
|
#include "byteorder.h"
|
||||||
#include "net/eui64.h"
|
#include "net/eui64.h"
|
||||||
|
#include "kernel_defines.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -207,6 +208,28 @@ extern const uint8_t ieee802154_addr_bcast[IEEE802154_ADDR_BCAST_LEN];
|
|||||||
* @ingroup config
|
* @ingroup config
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @brief IEEE802.15.4 default PHY mode
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
#if IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_BPSK)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_BPSK
|
||||||
|
#elif IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_ASK)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_ASK
|
||||||
|
#elif IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_OQPSK)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_OQPSK
|
||||||
|
#elif IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_MR_OQPSK)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_MR_OQPSK
|
||||||
|
#elif IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_MR_OFDM)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_MR_OFDM
|
||||||
|
#elif IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_PHY_MR_FSK)
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_MR_FSK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef CONFIG_IEEE802154_DEFAULT_PHY_MODE
|
||||||
|
#define CONFIG_IEEE802154_DEFAULT_PHY_MODE IEEE802154_PHY_OQPSK
|
||||||
|
#endif
|
||||||
|
/** @} */
|
||||||
/**
|
/**
|
||||||
* @brief IEEE802.15.4 default sub-GHZ channel
|
* @brief IEEE802.15.4 default sub-GHZ channel
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -12,6 +12,44 @@ menuconfig KCONFIG_USEMODULE_IEEE802154
|
|||||||
|
|
||||||
if KCONFIG_USEMODULE_IEEE802154
|
if KCONFIG_USEMODULE_IEEE802154
|
||||||
|
|
||||||
|
choice
|
||||||
|
bool "IEEE802.15.4 default PHY mode"
|
||||||
|
default IEEE802154_DEFAULT_PHY_OQPSK
|
||||||
|
help
|
||||||
|
IEEE802.15.4 default mode
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_BPSK
|
||||||
|
bool "BPSK"
|
||||||
|
help
|
||||||
|
Binary Phase Shift Keying
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_ASK
|
||||||
|
bool "ASK"
|
||||||
|
help
|
||||||
|
Amplitude-Shift Keying
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_OQPSK
|
||||||
|
bool "O-QPSK"
|
||||||
|
help
|
||||||
|
Offset Quadrature Phase-Shift Keying
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_MR_OQPSK
|
||||||
|
bool "MR-O-QPSK"
|
||||||
|
help
|
||||||
|
Multi-Rate Offset Quadrature Phase-Shift Keying
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_MR_OFDM
|
||||||
|
bool "MR-OFDM"
|
||||||
|
help
|
||||||
|
Multi-Rate Orthogonal Frequency-Division Multiplexing
|
||||||
|
|
||||||
|
config IEEE802154_DEFAULT_PHY_MR_FSK
|
||||||
|
bool "MR-FSK"
|
||||||
|
help
|
||||||
|
Multi-Rate Frequency Shift Keying
|
||||||
|
|
||||||
|
endchoice # IEEE802.15.4 default PHY mode
|
||||||
|
|
||||||
config IEEE802154_DEFAULT_SUBGHZ_CHANNEL
|
config IEEE802154_DEFAULT_SUBGHZ_CHANNEL
|
||||||
int "IEEE802.15.4 default sub-GHZ channel"
|
int "IEEE802.15.4 default sub-GHZ channel"
|
||||||
default 5
|
default 5
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user