Radio Control Layer (RCL)
ble5.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2023, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
33 #ifndef ti_drivers_RCL_handlers_ble5_h__include
34 #define ti_drivers_RCL_handlers_ble5_h__include
35 
36 #include <stdint.h>
39 #include <ti/drivers/rcl/LRF.h>
41 
42 /* Handler functions */
43 RCL_Events RCL_Handler_BLE5_adv(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
44 RCL_Events RCL_Handler_BLE5_scan_init(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
45 RCL_Events RCL_Handler_BLE5_conn(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
46 RCL_Events RCL_Handler_BLE5_dtmTx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
47 RCL_Events RCL_Handler_BLE5_genericRx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
48 RCL_Events RCL_Handler_BLE5_genericTx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
49 RCL_Events RCL_Handler_Ble5_txTest(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn);
50 
56 typedef enum
57 {
61 
62 /* API functions */
83 RCL_BLE5_FilterListUpdateResult RCL_BLE5_updateFilterList(const RCL_FL_Entry *newEntry, RCL_FilterList *filterList, uint32_t index);
84 
94 void RCL_BLE5_setDefaultRfFrequency(uint32_t rfFrequency);
95 
105 static inline RCL_Ble5Channel RCL_BLE5_getRxChannel(const RCL_Buffer_DataEntry *rxEntry)
106 {
107  return (RCL_Ble5Channel) rxEntry->pad0;
108 }
109 
119 RCL_Ble5_RxPktStatus RCL_BLE5_getRxStatus(const RCL_Buffer_DataEntry *rxEntry);
120 
130 int8_t RCL_BLE5_getRxRssi(const RCL_Buffer_DataEntry *rxEntry);
131 
143 uint32_t RCL_BLE5_getRxTimestamp(const RCL_Buffer_DataEntry *rxEntry);
144 
145 #endif /* ti_drivers_RCL_handlers_ble5_h__include */
RCL_Handler_BLE5_dtmTx
RCL_Events RCL_Handler_BLE5_dtmTx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:1673
RCL_BLE5_updateFilterList
RCL_BLE5_FilterListUpdateResult RCL_BLE5_updateFilterList(const RCL_FL_Entry *newEntry, RCL_FilterList *filterList, uint32_t index)
Update filter list.
Definition: ble5.c:2447
RCL_Ble5_RxPktStatus
Appended packet status field from RX buffer.
Definition: ble5.h:84
RCL_BLE5_FilterListUpdateIndexError
@ RCL_BLE5_FilterListUpdateIndexError
Definition: ble5.h:59
RCL_Handler_BLE5_conn
RCL_Events RCL_Handler_BLE5_conn(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:1335
ble5.h
RCL_BLE5_FilterListUpdateResult
RCL_BLE5_FilterListUpdateResult
Result of filter list update API.
Definition: ble5.h:57
LRF.h
RCL_Command.h
RCL_BLE5_FilterListUpdateOk
@ RCL_BLE5_FilterListUpdateOk
Definition: ble5.h:58
RCL_Buffer.h
RCL_BLE5_getRxChannel
static RCL_Ble5Channel RCL_BLE5_getRxChannel(const RCL_Buffer_DataEntry *rxEntry)
Get channel field from packet.
Definition: ble5.h:105
RCL_BLE5_getRxStatus
RCL_Ble5_RxPktStatus RCL_BLE5_getRxStatus(const RCL_Buffer_DataEntry *rxEntry)
Get received status field from packet.
Definition: ble5.c:2488
RCL_Handler_Ble5_txTest
RCL_Events RCL_Handler_Ble5_txTest(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:2289
RCL_Handler_BLE5_adv
RCL_Events RCL_Handler_BLE5_adv(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:300
RCL_Handler_BLE5_scan_init
RCL_Events RCL_Handler_BLE5_scan_init(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:765
RCL_Handler_BLE5_genericRx
RCL_Events RCL_Handler_BLE5_genericRx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:1911
RCL_BLE5_getRxRssi
int8_t RCL_BLE5_getRxRssi(const RCL_Buffer_DataEntry *rxEntry)
Get received RSSI from packet.
Definition: ble5.c:2523
RCL_BLE5_getRxTimestamp
uint32_t RCL_BLE5_getRxTimestamp(const RCL_Buffer_DataEntry *rxEntry)
Get received timestamp from packet.
Definition: ble5.c:2555
RCL_Ble5Channel
uint8_t RCL_Ble5Channel
Type for BLE channels.
Definition: ble5.h:67
RCL_Handler_BLE5_genericTx
RCL_Events RCL_Handler_BLE5_genericTx(RCL_Command *cmd, LRF_Events lrfEvents, RCL_Events rclEventsIn)
Definition: ble5.c:2156
RCL_BLE5_setDefaultRfFrequency
void RCL_BLE5_setDefaultRfFrequency(uint32_t rfFrequency)
Set RF frequency to use if custom frequency is specified.
Definition: ble5.c:2480