diff --git a/LimeSuite_Build_Thunk.h b/LimeSuite_Build_Thunk.h index b840e72..0557e1e 100644 --- a/LimeSuite_Build_Thunk.h +++ b/LimeSuite_Build_Thunk.h @@ -5,19 +5,17 @@ * * Copyright (C) 2016 Lime Microsystems * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ #ifndef LMS7_API_H @@ -47,15 +45,22 @@ extern "C" { # else # define API_EXPORT __declspec(dllexport) # endif -#else +#elif defined _DOXYGEN_ONLY_ + /** Marks an API routine to be made visible to the dynamic loader. + * This is OS and/or compiler-specific. */ # define API_EXPORT + /** Specifies calling convention, if necessary. + * This is OS and/or compiler-specific. */ +# define CALL_CONV +#else +# define API_EXPORT __attribute__ ((visibility ("default"))) # define CALL_CONV #endif -/**Floating point data type*/ +///Floating point data type typedef double float_type; -/**convenience constant for good return code*/ +///convenience constant for good return code static const int LMS_SUCCESS = 0; /** @@ -66,10 +71,10 @@ static const int LMS_SUCCESS = 0; * @{ */ -/**LMS Device handle */ +///LMS Device handle typedef void lms_device_t; -/**Convenience type for fixed length LMS Device information string*/ +///Convenience type for fixed length LMS Device information string typedef char lms_info_str_t[256]; /** @@ -82,8 +87,7 @@ typedef char lms_info_str_t[256]; API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list); /** - * Opens device specified by the provided ::lms_dev_info string - * + * Opens device specified by the provided ::lms_info_str_t string * This function should be used to open a device based upon the results of * LMS_GetDeviceList() * @@ -96,8 +100,8 @@ API_EXPORT int CALL_CONV LMS_GetDeviceList(lms_info_str_t *dev_list); * * @return 0 on success, (-1) on failure */ -API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, lms_info_str_t info, - void* args); +API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, const lms_info_str_t info, + void* args); /** * Close device @@ -110,7 +114,6 @@ API_EXPORT int CALL_CONV LMS_Open(lms_device_t **device, lms_info_str_t info, */ API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device); - /** * Disconnect device but keep configuration cache (device is not deallocated). * @@ -121,20 +124,17 @@ API_EXPORT int CALL_CONV LMS_Close(lms_device_t *device); API_EXPORT int CALL_CONV LMS_Disconnect(lms_device_t *device); /** - * Checks if device port is opened + * Check if device port is opened * * @param device Device handle previously obtained by LMS_Open(). - * @param port 0 - control port, 1- data port + * @param port port index (ignored if device has only 1 port) * * @return true(1) if port is open, false (0) if - closed */ API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port); - /** @} (End FN_INIT) */ - - /** * @defgroup FN_HIGH_LVL High-level control functions * @@ -144,33 +144,29 @@ API_EXPORT bool CALL_CONV LMS_IsOpen(lms_device_t *device, int port); * @{ */ -/**Convenience constants for TX/RX selection*/ -const bool LMS_CH_TX = true; -const bool LMS_CH_RX = false; +static const bool LMS_CH_TX = true; ///