Radio Control Layer (RCL)
hal.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2024, 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 __rcl_hal_h__
34 #define __rcl_hal_h__
35 
36 #include <stdint.h>
37 
38 void hal_init_fsm(void (*setupFsmCb)(void), void (*schedFsmCb)(void),
39  void (*commandFsmCb)(void));
40 void hal_trigger_command_fsm(void);
41 void hal_trigger_dispatch_fsm(void);
42 void hal_trigger_scheduler_fsm(void);
43 uint32_t hal_get_command_ifg_reg(void);
44 uint32_t hal_get_dispatch_ifg_reg(void);
45 uint32_t hal_get_current_time(void);
46 void hal_enable_setup_time_irq(void);
47 void hal_setup_setup_time(uint32_t setupTime);
48 void hal_setup_start_time(uint32_t startTime);
49 void hal_setup_hard_stop_time(uint32_t stopTime);
52 void hal_setup_graceful_stop_time(uint32_t stopTime);
54 void hal_cancel_setup_time(void);
55 void hal_cancel_start_time(void);
56 void hal_cancel_hard_stop_time(void);
58 void hal_init_dispatch_radio_interrupts(uint32_t mask);
59 void hal_enable_command_radio_interrupt(uint32_t mask);
60 void hal_disable_command_radio_interrupt(uint32_t mask);
61 void hal_clear_command_radio_interrupt(uint32_t mask);
64 void hal_temperature_init(void);
65 int16_t hal_get_temperature(void);
66 uint32_t hal_get_hfxt_ratio(void);
67 uint32_t hal_get_hfxt_ratio_default(void);
68 
69 typedef enum {
76 
77 typedef enum {
82 
84 void hal_setup_cmd_start_cap(void);
85 void hal_arm_cmd_start_cap(void);
86 uint32_t hal_get_cmd_start_cap(void);
87 void hal_setup_sync_found_cap(void);
88 void hal_arm_sync_found_cap(void);
89 uint32_t hal_get_sync_found_cap(void);
90 void hal_setup_cmd_done_cap(void);
91 void hal_arm_cmd_done_cap(void);
92 uint32_t hal_get_cmd_done_cap(void);
93 void hal_set_rcl_clock_enable(uint16_t mask);
94 void hal_clear_rcl_clock_enable(uint16_t mask);
95 void hal_enable_clk_buffer(void);
96 void hal_power_set_constraint(void);
98 void hal_power_open(void (*f)(RCL_PowerEvent));
99 void hal_power_close(void);
100 #endif
void hal_trigger_scheduler_fsm(void)
Definition: hal_cc23x0.c:176
void hal_enable_hard_stop_time_irq(void)
Definition: hal_cc23x0.c:227
void hal_disable_command_radio_interrupt(uint32_t mask)
Definition: hal_cc23x0.c:361
void hal_disable_all_command_radio_interrupts(void)
Definition: hal_cc23x0.c:367
void hal_arm_cmd_done_cap(void)
Definition: hal.h:80
void hal_arm_cmd_start_cap(void)
Definition: hal.h:71
uint32_t hal_get_hfxt_ratio_default(void)
Definition: hal_cc23x0.c:468
void hal_disable_all_dispatch_radio_interrupts(void)
Definition: hal_cc23x0.c:373
void hal_enable_setup_time_irq(void)
Definition: hal_cc23x0.c:193
void hal_setup_cmd_start_cap(void)
void hal_setup_start_time(uint32_t startTime)
Definition: hal_cc23x0.c:211
void hal_power_open(void(*f)(RCL_PowerEvent))
Definition: hal_cc23x0.c:432
uint32_t hal_get_sync_found_cap(void)
void hal_init_dispatch_radio_interrupts(uint32_t mask)
Definition: hal_cc23x0.c:344
void hal_power_close(void)
Definition: hal_cc23x0.c:443
RCL_PowerEvent
Definition: hal.h:77
void hal_setup_setup_time(uint32_t setupTime)
Definition: hal_cc23x0.c:198
uint32_t hal_get_current_time(void)
Definition: hal_cc23x0.c:182
void hal_init_fsm(void(*setupFsmCb)(void), void(*schedFsmCb)(void), void(*commandFsmCb)(void))
Definition: hal_cc23x0.c:131
uint32_t hal_get_cmd_done_cap(void)
void hal_clear_rcl_clock_enable(uint16_t mask)
Definition: hal_cc23x0.c:386
void hal_setup_cmd_done_cap(void)
void hal_cancel_start_time(void)
Definition: hal_cc23x0.c:267
void hal_enable_graceful_stop_time_irq(void)
Definition: hal_cc23x0.c:244
uint32_t hal_get_dispatch_ifg_reg(void)
Definition: hal_cc23x0.c:117
void hal_disable_hard_stop_time_irq(void)
Definition: hal_cc23x0.c:232
int16_t hal_get_temperature(void)
void hal_enable_command_radio_interrupt(uint32_t mask)
Definition: hal_cc23x0.c:350
void hal_set_rcl_clock_enable(uint16_t mask)
Definition: hal_cc23x0.c:379
void hal_trigger_command_fsm(void)
Definition: hal_cc23x0.c:164
void hal_cancel_setup_time(void)
Definition: hal_cc23x0.c:262
void hal_power_release_constraint(void)
Definition: hal_cc23x0.c:423
Definition: hal.h:79
uint32_t hal_get_hfxt_ratio(void)
Definition: hal_cc23x0.c:463
Definition: hal.h:73
void hal_enable_clk_buffer(void)
Definition: hal_cc23x0.c:285
uint32_t hal_get_command_ifg_reg(void)
Definition: hal_cc23x0.c:104
void hal_trigger_dispatch_fsm(void)
Definition: hal_cc23x0.c:170
Definition: hal.h:78
void hal_power_set_constraint(void)
Definition: hal_cc23x0.c:414
void hal_setup_graceful_stop_time(uint32_t stopTime)
Definition: hal_cc23x0.c:237
HalTimerEvent hal_check_clear_timer_compare(void)
Definition: hal_cc23x0.c:304
void hal_temperature_init(void)
Definition: hal_cc23x0.c:452
void hal_setup_hard_stop_time(uint32_t stopTime)
Definition: hal_cc23x0.c:219
void hal_cancel_hard_stop_time(void)
Definition: hal_cc23x0.c:272
void hal_clear_command_radio_interrupt(uint32_t mask)
Definition: hal_cc23x0.c:356
void hal_arm_sync_found_cap(void)
HalTimerEvent
Definition: hal.h:69
Definition: hal.h:72
void hal_setup_sync_found_cap(void)
Definition: hal_cc23x0.c:293
Definition: hal.h:70
Definition: hal.h:74
void hal_cancel_graceful_stop_time(void)
Definition: hal_cc23x0.c:277
uint32_t hal_get_cmd_start_cap(void)