Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers ns_virtual_rf_api.h Source File

ns_virtual_rf_api.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2016 ARM Limited. All rights reserved.
00003  *
00004  * SPDX-License-Identifier: LicenseRef-PBL
00005  *
00006  * Licensed under the Permissive Binary License, Version 1.0 (the "License"); you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  * https://www.mbed.com/licenses/PBL-1.0
00010  *
00011  * See the License for the specific language governing permissions and limitations under the License.
00012  *
00013  */
00014 
00015 /** \file ns_virtual_rf_api.h
00016  * \brief Virtual RF interface API.
00017  */
00018 
00019 #ifndef NS_VIRTUAL_RF_API_H_
00020 #define NS_VIRTUAL_RF_API_H_
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024 
00025 #include "platform/arm_hal_phy.h"
00026 
00027 
00028 /**
00029  * @brief virtual_rf_device_register Creates virtual RF device
00030  * Emulates "radio" link like the real RF driver would do it. MAC does not know the difference.
00031  * Sends and listens data to/from serial MAC.
00032  * @param link_type Link type behind virtual device
00033  * @param mtu_size Maximum transmission unit size
00034  * @return Rf driver id
00035  */
00036 int8_t virtual_rf_device_register(phy_link_type_e link_type, uint16_t mtu_size);
00037 
00038 /**
00039  * @brief virtual_rf_client_register Creates virtual RF client
00040  * "Acts" in a role of upper layer for MAC (802.15.4 or ethernet) and in a role of RF driver for serial MAC.
00041  * Forwards data between serial MAC and either 802.15.4 or ethernet MAC.
00042  * @return Rf driver id
00043  */
00044 int8_t virtual_rf_client_register(void);
00045 
00046 
00047 #ifdef __cplusplus
00048 }
00049 #endif
00050 #endif /* NS_VIRTUAL_RF_API_H_ */