TI BLE5-Stack API Documentation
2.00.04.00
.build.ble5.cc13x2_26x2
api-sources
ble-core
Examples_source
common
RTLS
inc
rtls_ctrl.h
Go to the documentation of this file.
1
/******************************************************************************
2
3
@file rtls_ctrl.h
4
5
@brief This file contains internal defines and macros used by rtls_ctrl.c
6
7
Group: WCS, BTS
8
$Target Device: DEVICES $
9
10
******************************************************************************
11
$License: BSD3 2018 $
12
******************************************************************************
13
$Release Name: PACKAGE NAME $
14
$Release Date: PACKAGE RELEASE DATE $
15
*****************************************************************************/
16
26
#ifndef RTLS_CTRL_H_
27
#define RTLS_CTRL_H_
28
29
#ifdef __cplusplus
30
extern
"C"
31
{
32
#endif
33
34
/*********************************************************************
35
* INCLUDES
36
*/
37
#ifdef USE_ICALL
38
#include "
icall.h
"
39
#else
40
#define HAL_ASSERT_CAUSE_OUT_OF_MEMORY 0x04
41
#endif
42
43
/*********************************************************************
44
* EXTERNAL VARIABLES
45
*/
46
47
/*********************************************************************
48
* CONSTANTS
49
*/
50
51
// RTLS Task configuration
52
#define RTLS_CTRL_TASK_PRIORITY 2
53
#define RTLS_CTRL_TASK_STACK_SIZE 752
54
55
#define RTLS_QUEUE_EVT UTIL_QUEUE_EVENT_ID
56
57
#define RTLS_CTRL_ALL_EVENTS (RTLS_QUEUE_EVT)
58
59
60
#define RTLS_CMD_IDENTIFY 0x00
61
#define RTLS_CMD_RESERVED 0x01
62
#define RTLS_CMD_CONN_PARAMS 0x02
63
#define RTLS_CMD_CONNECT 0x03
64
#define RTLS_CMD_SCAN 0x04
65
#define RTLS_CMD_SCAN_STOP 0x05
66
#define RTLS_CMD_TOF_RESULT_DIST 0x06
67
#define RTLS_CMD_TOF_RESULT_STAT 0x07
68
#define RTLS_CMD_TOF_RESULT_RAW 0x08
69
#define RTLS_CMD_TOF_SET_SEC_SEED 0x09
70
#define RTLS_CMD_TOF_GET_SEC_SEED 0x10
71
#define RTLS_CMD_TOF_SET_PARAMS 0x11
72
#define RTLS_CMD_TOF_ENABLE 0x12
73
#define RTLS_CMD_AOA_SET_PARAMS 0x13
74
#define RTLS_CMD_AOA_ENABLE 0x14
75
#define RTLS_CMD_RESET_DEVICE 0x20
76
#define RTLS_CMD_TERMINATE_LINK 0x22
77
#define RTLS_CMD_AOA_RESULT_ANGLE 0x23
78
#define RTLS_CMD_AOA_RESULT_RAW 0x24
79
#define RTLS_CMD_AOA_RESULT_PAIR_ANGLES 0x25
80
#define RTLS_CMD_TOF_CALIBRATE 0x26
81
82
// RTLS async event
83
#define RTLS_EVT_ASSERT 0x80
84
#define RTLS_EVT_ERROR 0x81
85
#define RTLS_EVT_DEBUG 0x82
86
87
88
/*********************************************************************
89
* MACROS
90
*/
91
#ifdef USE_ICALL
92
#define RTLSUTIL_MALLOC(pAlloc, size) { \
94
pAlloc = ICall_malloc(size); \
95
}
96
#define RTLSUTIL_FREE(pMsg) ICall_free(pMsg)
98
#else
99
#define RTLSUTIL_MALLOC(pAlloc, size) { \
101
volatile uint32_t keyHwi; \
102
volatile uint32_t keySwi; \
103
keyHwi = Hwi_disable(); \
104
keySwi = Swi_disable(); \
105
pAlloc = malloc(size); \
106
Swi_restore(keySwi); \
107
Hwi_restore(keyHwi); \
108
}
109
#define RTLSUTIL_FREE(pFree) { \
111
volatile uint32_t keyHwi; \
112
volatile uint32_t keySwi; \
113
keyHwi = Hwi_disable(); \
114
keySwi = Swi_disable(); \
115
free(pFree); \
116
pFree = NULL; \
117
Swi_restore(keySwi); \
118
Hwi_restore(keyHwi); \
119
}
120
#endif
121
/*********************************************************************
122
* TYPEDEFS
123
*/
124
125
/*********************************************************************
126
* API FUNCTIONS
127
*/
128
137
void
*
RTLSCtrl_malloc
(uint32_t sz);
138
139
/*********************************************************************
140
*********************************************************************/
141
142
#ifdef __cplusplus
143
}
144
#endif
145
146
#endif
/* RTLS_CTRL_H_ */
147
RTLSCtrl_malloc
void * RTLSCtrl_malloc(uint32_t sz)
This function will allocate memory, if we were unable to allocate we will report to RTLS Host...
icall.h
ICall layer interface.
© Copyright 1995-2019
, Texas Instruments Incorporated. All rights reserved.
Trademarks
|
Privacy policy
|
Terms of use
|
Terms of sale