Radio Control Layer (RCL)
hal.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 __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);
43 uint32_t hal_get_ifg_reg(void);
44 uint32_t hal_get_current_time(void);
45 void hal_enable_setup_time_irq(void);
46 void hal_setup_setup_time(uint32_t setupTime);
47 void hal_setup_start_time(uint32_t startTime);
48 void hal_setup_hard_stop_time(uint32_t stopTime);
50 void hal_setup_graceful_stop_time(uint32_t stopTime);
52 void hal_cancel_setup_time(void);
53 void hal_cancel_start_time(void);
54 void hal_cancel_hard_stop_time(void);
57 void hal_temperature_init(void);
58 int16_t hal_get_temperature(void);
59 uint32_t hal_get_hfxt_ratio(void);
60 uint32_t hal_get_hfxt_ratio_default(void);
61 
62 typedef enum {
69 
70 typedef enum {
74 
76 void hal_setup_cmd_start_cap(void);
77 void hal_arm_cmd_start_cap(void);
78 uint32_t hal_get_cmd_start_cap(void);
79 void hal_setup_sync_found_cap(void);
80 void hal_arm_sync_found_cap(void);
81 uint32_t hal_get_sync_found_cap(void);
82 void hal_setup_cmd_done_cap(void);
83 void hal_arm_cmd_done_cap(void);
84 uint32_t hal_get_cmd_done_cap(void);
85 void hal_set_clkctl(uint32_t clkctl);
86 void hal_enable_clk_buffer(void);
87 void hal_power_set_constraint(void);
89 void hal_power_open(void (*f)(RCL_PowerEvent));
90 void hal_power_close(void);
91 #endif
void hal_enable_hard_stop_time_irq(void)
Definition: hal_cc23x0.c:205
void hal_disable_radio_interrupts(void)
Definition: hal_cc23x0.c:317
void hal_arm_cmd_done_cap(void)
void hal_arm_cmd_start_cap(void)
Definition: hal.h:64
uint32_t hal_get_hfxt_ratio_default(void)
Definition: hal_cc23x0.c:429
void hal_enable_setup_time_irq(void)
Definition: hal_cc23x0.c:171
void hal_setup_cmd_start_cap(void)
void hal_setup_start_time(uint32_t startTime)
Definition: hal_cc23x0.c:189
void hal_power_open(void(*f)(RCL_PowerEvent))
Definition: hal_cc23x0.c:391
uint32_t hal_get_sync_found_cap(void)
void hal_power_close(void)
Definition: hal_cc23x0.c:401
RCL_PowerEvent
Definition: hal.h:70
void hal_setup_setup_time(uint32_t setupTime)
Definition: hal_cc23x0.c:176
uint32_t hal_get_current_time(void)
Definition: hal_cc23x0.c:160
void hal_set_clkctl(uint32_t clkctl)
Definition: hal_cc23x0.c:324
void hal_init_fsm(void(*setupFsmCb)(void), void(*schedFsmCb)(void), void(*commandFsmCb)(void))
Definition: hal_cc23x0.c:121
uint32_t hal_get_cmd_done_cap(void)
void hal_setup_cmd_done_cap(void)
void hal_cancel_start_time(void)
Definition: hal_cc23x0.c:240
void hal_enable_graceful_stop_time_irq(void)
Definition: hal_cc23x0.c:217
void hal_trigger_scheduler_fsm()
Definition: hal_cc23x0.c:154
int16_t hal_get_temperature(void)
void hal_trigger_command_fsm(void)
Definition: hal_cc23x0.c:142
void hal_cancel_setup_time(void)
Definition: hal_cc23x0.c:235
void hal_power_release_constraint(void)
Definition: hal_cc23x0.c:382
Definition: hal.h:72
uint32_t hal_get_ifg_reg(void)
Definition: hal_cc23x0.c:105
uint32_t hal_get_hfxt_ratio(void)
Definition: hal_cc23x0.c:424
Definition: hal.h:66
void hal_enable_clk_buffer(void)
Definition: hal_cc23x0.c:258
void hal_trigger_dispatch_fsm(void)
Definition: hal_cc23x0.c:148
Definition: hal.h:71
void hal_power_set_constraint(void)
Definition: hal_cc23x0.c:373
void hal_setup_graceful_stop_time(uint32_t stopTime)
Definition: hal_cc23x0.c:210
HalTimerEvent hal_check_clear_timer_compare(void)
Definition: hal_cc23x0.c:277
void hal_temperature_init(void)
Definition: hal_cc23x0.c:409
void hal_setup_hard_stop_time(uint32_t stopTime)
Definition: hal_cc23x0.c:197
void hal_cancel_hard_stop_time(void)
Definition: hal_cc23x0.c:245
void hal_arm_sync_found_cap(void)
HalTimerEvent
Definition: hal.h:62
Definition: hal.h:65
void hal_setup_sync_found_cap(void)
Definition: hal_cc23x0.c:266
Definition: hal.h:63
Definition: hal.h:67
void hal_cancel_graceful_stop_time(void)
Definition: hal_cc23x0.c:250
uint32_t hal_get_cmd_start_cap(void)