1 /******************************************************************************
2 @file api_mac_linux.h
4 @brief TIMAC 2.0 API Linux implimentation header for api_mac
6 Group: WCS LPC
7 $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350, CC1352$
9 ******************************************************************************
10 $License: BSD3 2016 $
12 Copyright (c) 2015, Texas Instruments Incorporated
13 All rights reserved.
15 Redistribution and use in source and binary forms, with or without
16 modification, are permitted provided that the following conditions
17 are met:
19 * Redistributions of source code must retain the above copyright
20 notice, this list of conditions and the following disclaimer.
22 * Redistributions in binary form must reproduce the above copyright
23 notice, this list of conditions and the following disclaimer in the
24 documentation and/or other materials provided with the distribution.
26 * Neither the name of Texas Instruments Incorporated nor the names of
27 its contributors may be used to endorse or promote products derived
28 from this software without specific prior written permission.
30 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
31 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
32 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
34 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
35 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
36 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
37 OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
39 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
40 EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41 ******************************************************************************
42 $Release Name: TI-15.4Stack Linux x64 SDK$
43 $Release Date: Sept 27, 2017 (2.04.00.13)$
44 *****************************************************************************/
46 #if !defined(API_MAC_LINUX_H)
47 #define API_MAC_LINUX_H
49 /******************************************************************************
50 Constants and Definitions
51 *****************************************************************************/
53 /*! Debug Log flag specific to api-mac */
54 #define LOG_DBG_API_MAC_wait _bitN(LOG_DBG_API_MAC_bitnum_first+0)
55 #define LOG_DBG_API_MAC_datastats _bitN(LOG_DBG_API_MAC_bitnum_first+1)
58 /* TX Options (from the embedded) */
59 /*! Acknowledged transmission. The MAC will attempt to retransmit
60 the frame until it is acknowledged */
61 #define MAC_TXOPTION_ACK 0x0001
62 /*! GTS transmission (unused) */
63 #define MAC_TXOPTION_GTS 0x0002
64 /*! Indirect transmission. The MAC will queue the data and wait
65 for the destination device to poll for it. This can only be used
66 by a coordinator device */
67 #define MAC_TXOPTION_INDIRECT 0x0004
68 /*! This proprietary option forces the pending bit set for direct
69 transmission */
70 #define MAC_TXOPTION_PEND_BIT 0x0008
71 /*! This proprietary option prevents the frame from being retransmitted */
72 #define MAC_TXOPTION_NO_RETRANS 0x0010
73 /*! This proprietary option prevents a MAC_MCPS_DATA_CNF
74 event from being sent for this frame */
75 #define MAC_TXOPTION_NO_CNF 0x0020
76 /*! Use PIB value MAC_ALT_BE for the minimum backoff exponent */
77 #define MAC_TXOPTION_ALT_BE 0x0040
78 /*! Use the power and channel values in macDataReq_t
79 instead of the PIB values */
80 #define MAC_TXOPTION_PWR_CHAN 0x0080
81 /*! Special transmit for Green Power for CC2530 only. Must be direct */
82 #define MAC_TXOPTION_GREEN_PWR 0x0100
84 /******************************************************************************
85 Variables
86 *****************************************************************************/
88 /*!
89 @brief the application points this to the message interface structure.
90 */
91 extern struct mt_msg_interface *API_MAC_msg_interface;
93 /*! How long should the API-MAC wait when there are no messsages to process. */
94 extern int ApiMacLinux_areq_timeout_mSecs;
95 /*! Default value if not overridden via configuration file */
96 #ifdef IS_HEADLESS
97 #define DEFAULT_ApiMacLinux_areq_timeout_mSecs (10 * 1000)
98 #else
99 /*! timeout every 500ms to allow UI polling */
100 #define DEFAULT_ApiMacLinux_areq_timeout_mSecs (300)
101 #endif //HEADLESS
103 extern struct mt_version_info MT_DEVICE_version_info;
105 #endif // API_MAC_LINUX_H
107 /*
108 * ========================================
109 * Texas Instruments Micro Controller Style
110 * ========================================
111 * Local Variables:
112 * mode: c
113 * c-file-style: "bsd"
114 * tab-width: 4
115 * c-basic-offset: 4
116 * indent-tabs-mode: nil
117 * End:
118 * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true
119 */