Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
arm_hal_phy.h File Reference
PHY device driver API. More...
Go to the source code of this file.
Detailed Description
PHY device driver API.
Definition in file arm_hal_phy.h.
Typedef Documentation
| typedef int8_t arm_net_phy_rx_fn(const uint8_t *data_ptr, uint16_t data_len, uint8_t link_quality, int8_t dbm, int8_t driver_id) |
arm_net_phy_rx RX callback set by upper layer.
Called when data is received
- Parameters:
-
data_ptr Data received data_len Length of the data received link_quality Link quality dbm Power ratio in decibels driver_id ID of driver which received data
- Returns:
- 0 if success, error otherwise
Definition at line 214 of file arm_hal_phy.h.
| typedef int8_t arm_net_phy_tx_done_fn(int8_t driver_id, uint8_t tx_handle, phy_link_tx_status_e status, uint8_t cca_retry, uint8_t tx_retry) |
arm_net_phy_tx_done TX done callback set by upper layer.
Called when tx sent by upper layer has been handled
- Parameters:
-
driver_id Id of the driver which handled TX request tx_handle Handle of the TX status Status code of the TX handling result cca_retry Number of CCA retries done during handling tx_retry Number of TX retries done during handling
- Returns:
- 0 if success, error otherwise
Definition at line 225 of file arm_hal_phy.h.
| typedef int8_t arm_net_virtual_config_rx_fn(int8_t driver_id, const uint8_t *data, uint16_t length) |
arm_net_virtual_config Configuration receive callback set by upper layer.
Used to receive internal configuration parameters.
- Parameters:
-
driver_id Id of the driver to be used. data Pointer to received configuration data. length Length of the configuration data.
- Returns:
- 0 if success, error otherwise
Definition at line 251 of file arm_hal_phy.h.
| typedef int8_t arm_net_virtual_config_tx_fn(int8_t driver_id, const uint8_t *data, uint16_t length) |
arm_net_virtual_config Configuration send callback set by upper layer.
Used to send internal configuration parameters.
- Parameters:
-
driver_id Id of the driver to be used. data Pointer to sent configuration data. length Length of the configuration data.
- Returns:
- 0 if success, error otherwise
Definition at line 260 of file arm_hal_phy.h.
| typedef int8_t arm_net_virtual_confirmation_rx_fn(int8_t driver_id, const uint8_t *data, uint16_t length) |
arm_net_virtual_confirmation Confirmation receive callback set by upper layer.
Used to receive MLME confirmation data.
- Parameters:
-
driver_id Id of the driver to be used. data Pointer to received confirmation data. length Length of the confirmation data.
- Returns:
- 0 if success, error otherwise
Definition at line 269 of file arm_hal_phy.h.
| typedef int8_t arm_net_virtual_rx_fn(const uint8_t *data_ptr, uint16_t data_len, int8_t driver_id) |
arm_net_virtual_rx RX callback set by user of serial MAC.
Called when virtual RF has received data.
- Parameters:
-
data_ptr Data received data_len Length of the data received driver_id ID of driver which received data
- Returns:
- 0 if success, error otherwise
Definition at line 234 of file arm_hal_phy.h.
| typedef int8_t arm_net_virtual_tx_fn(const virtual_data_req_t *data_req, int8_t driver_id) |
arm_net_virtual_tx TX callback set by serial MAC.
Used to send data.
- Parameters:
-
data_req Data to be sent driver_id Id of the driver to be used.
- Returns:
- 0 if success, error otherwise
Definition at line 242 of file arm_hal_phy.h.
| typedef enum data_protocol_e data_protocol_e |
Data layers.
| typedef enum driver_data_request_e driver_data_request_e |
Requested data layer.
| typedef struct phy_csma_params phy_csma_params_t |
CSMA-CA parameters.
| typedef struct phy_device_channel_page_s phy_device_channel_page_s |
Channel page configuration.
| typedef struct phy_device_driver_s phy_device_driver_s |
Device driver structure.
| typedef enum phy_link_type_e phy_link_type_e |
PHY types.
| typedef enum phy_modulation_e phy_modulation_e |
PHY modulation scheme.
| typedef struct phy_rf_channel_configuration_s phy_rf_channel_configuration_s |
Channel configuration.
| typedef struct phy_rf_statistics_s phy_rf_statistics_s |
PHY statistics.
| typedef struct phy_signal_info_s phy_signal_info_s |
Signal level info.
| typedef enum phy_signal_info_type_e phy_signal_info_type_e |
Signal info types.
Types of signal quality indication desired by various link protocols. Some are really statistical, but a driver should ideally be able to create an estimate based on its LQI/DBM numbers, for example to bootstrap a statistic calculation.
| typedef struct virtual_data_req_s virtual_data_req_t |
Virtual data request.
Enumeration Type Documentation
| enum channel_page_e |
Channel page numbers.
- Enumerator:
Definition at line 155 of file arm_hal_phy.h.
| enum data_protocol_e |
Data layers.
- Enumerator:
Definition at line 104 of file arm_hal_phy.h.
Requested data layer.
- Enumerator:
PHY_LAYER_PAYLOAD_DATA_FLOW PHY layer data.
IPV6_DATAGRAMS_DATA_FLOW IP layer data or TUN driver request data.
Definition at line 113 of file arm_hal_phy.h.
| enum phy_address_type_e |
Address types.
- Enumerator:
Definition at line 86 of file arm_hal_phy.h.
| enum phy_extension_type_e |
Extension types.
- Enumerator:
PHY_EXTENSION_CTRL_PENDING_BIT Control MAC pending bit for indirect data.
PHY_EXTENSION_READ_LAST_ACK_PENDING_STATUS Read status if the last ACK is still pending.
PHY_EXTENSION_SET_CHANNEL Net library channel set.
PHY_EXTENSION_READ_CHANNEL_ENERGY RF interface ED scan energy read.
PHY_EXTENSION_READ_LINK_STATUS Net library could read link status.
PHY_EXTENSION_CONVERT_SIGNAL_INFO Convert signal info.
PHY_EXTENSION_ACCEPT_ANY_BEACON Set boolean true or false for accept beacon from other Pan-ID than configured.
Default value should be false
PHY_EXTENSION_SET_TX_TIME Net library sets transmission time based on global time stamp.
Max. 65ms from setting to TX. If TX time is set to zero, it should be ignored.
PHY_EXTENSION_READ_RX_TIME Read the time of last reception based on global micro seconds time stamp.
PHY_EXTENSION_READ_TX_FINNISH_TIME Read the time of last finished TX micro seconds based on global time stamp.
PHY_EXTENSION_DYNAMIC_RF_SUPPORTED Read status for support Radio driver support for set TX time, CCA and Timestamp read.
Also PHY_LINK_CCA_PREPARE tx status must be supported also
PHY_EXTENSION_GET_TIMESTAMP Read 32-bit constant monotonic time stamp in us.
PHY_EXTENSION_SET_CSMA_PARAMETERS CSMA parameter's are given by phy_csma_params_t structure remember type cast uint8_t pointer to structure type.
PHY_EXTENSION_GET_SYMBOLS_PER_SECOND Read Symbols per seconds which will help to convert symbol time to real time.
PHY_EXTENSION_SET_RF_CONFIGURATION Set RF configuration using phy_rf_channel_configuration_s structure.
PHY_EXTENSION_FILTERING_SUPPORT Return filtering modes that can be supported by the PHY driver.
See phy_link_filters_e
PHY_EXTENSION_SET_TX_POWER Set TX output power which is given as percentage of maximum.
0 is the lowest possible TX power and 100 is the highest possible TX power
PHY_EXTENSION_SET_CCA_THRESHOLD Set CCA threshold which is given as percentage of maximum threshold.
0 is the lowest(strictest) possible threshold and 100 is the highest possible threshold
Definition at line 64 of file arm_hal_phy.h.
Interface states.
- Enumerator:
Definition at line 38 of file arm_hal_phy.h.
| enum phy_link_filters_e |
MAC filtering modes.
Set corresponding bit to 1 (1 << MAC_FRAME_VERSION_X) in PHY_EXTENSION_FILTERING_SUPPORT request when PHY can handle the filtering of this frame type. NOTE: Currently MAC supports filtering and Acking only 802.15.4-2015 frames. Any other frame version must be filtered and Acked by PHY with either HW or SW solution.
Definition at line 59 of file arm_hal_phy.h.
| enum phy_link_tx_status_e |
TX process return codes.
- Enumerator:
Definition at line 47 of file arm_hal_phy.h.
| enum phy_link_type_e |
PHY types.
- Enumerator:
Definition at line 94 of file arm_hal_phy.h.
| enum phy_modulation_e |
PHY modulation scheme.
- Enumerator:
M_OFDM QFDM.
M_OQPSK OQPSK.
M_BPSK BPSK.
M_GFSK GFSK.
M_2FSK 2FSK
M_UNDEFINED UNDEFINED.
Definition at line 145 of file arm_hal_phy.h.
Modulation index.
- Enumerator:
MODULATION_INDEX_0_5 Modulation index 0.5.
MODULATION_INDEX_1_0 Modulation index 1.0.
MODULATION_INDEX_UNDEFINED Modulation index undefined.
Definition at line 168 of file arm_hal_phy.h.
Signal info types.
Types of signal quality indication desired by various link protocols. Some are really statistical, but a driver should ideally be able to create an estimate based on its LQI/DBM numbers, for example to bootstrap a statistic calculation.
- Enumerator:
Definition at line 124 of file arm_hal_phy.h.
Function Documentation
| uint8_t* arm_net_phy_mac64_get | ( | int8_t | id ) |
Get driver mac64 address.
- Parameters:
-
id driver id
- Returns:
- > 0 Return pointer to MAC.
- NULL.
Definition at line 114 of file rf_driver_storage.c.
| int8_t arm_net_phy_mac64_set | ( | uint8_t * | MAC, |
| int8_t | id | ||
| ) |
Set driver mac64 address.
- Parameters:
-
MAC A pointer to new mac64 address which is copied to old one. id driver id
- Returns:
- >= 0 SET OK.
- < 0 Means register fail.
Definition at line 103 of file rf_driver_storage.c.
| uint16_t arm_net_phy_mtu_size | ( | int8_t | id ) |
Get driver link type MTU size.
- Parameters:
-
id driver id
- Returns:
- size of MTU.
Definition at line 132 of file rf_driver_storage.c.
| int8_t arm_net_phy_register | ( | phy_device_driver_s * | phy_driver ) |
This function registers the device driver to stack.
- Parameters:
-
phy_driver A pointer to device driver structure.
- Returns:
- >= 0 Device driver ID.
- < 0 Means register fail.
Definition at line 67 of file rf_driver_storage.c.
| int arm_net_phy_rf_type | ( | int8_t | id ) |
Get driver link type.
- Parameters:
-
id driver id
- Returns:
- driver link type.
Definition at line 123 of file rf_driver_storage.c.
| void arm_net_phy_unregister | ( | int8_t | driver_id ) |
Unregister the driver from storage.
- Parameters:
-
driver_id driver id
Definition at line 141 of file rf_driver_storage.c.
Generated on Tue Jul 12 2022 13:55:05 by
1.7.2