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 int16_t hal_get_temperature(void);
58 
59 typedef enum {
66 
67 typedef enum {
71 
73 void hal_setup_sync_found_cap(void);
75 uint32_t hal_get_sync_found_cap(void);
76 void hal_set_clkctl(uint32_t clkctl);
77 void hal_enable_clk_buffer(void);
78 void hal_power_set_constraint(void);
80 void hal_power_open(void (*f)(RCL_PowerEvent));
81 void hal_power_close(void);
82 void hal_set_systim_imask(void);
83 #endif
powerAwakeStandbyObj
Power_NotifyObj powerAwakeStandbyObj
Definition: hal_cc23x0rx.c:60
hal_get_sync_found_cap
uint32_t hal_get_sync_found_cap(void)
hal_power_release_constraint
void hal_power_release_constraint(void)
Definition: hal_cc23x0rx.c:362
SYSTIM_CH2_SETUP
@ SYSTIM_CH2_SETUP
Definition: hal_cc23x0rx.c:160
hal_setup_start_time
void hal_setup_start_time(uint32_t startTime)
Definition: hal_cc23x0rx.c:177
hal_disable_radio_interrupts
void hal_disable_radio_interrupts(void)
Definition: hal_cc23x0rx.c:293
hal_setup_setup_time
void hal_setup_setup_time(uint32_t time)
Definition: hal_cc23x0rx.c:170
halSchedFsmCb
void(* halSchedFsmCb)(void)
Definition: hal_cc23x0rx.c:66
hal_power_post_notify_fxn
static int hal_power_post_notify_fxn(unsigned int eventType, uintptr_t eventArg, uintptr_t clientArg)
Definition: hal_cc23x0rx.c:333
hal_get_ifg_reg
uint32_t hal_get_ifg_reg(void)
Definition: hal_cc23x0rx.c:99
RF_schedHwi
static void RF_schedHwi(uintptr_t a)
Definition: hal_cc23x0rx.c:68
RCL_POWER_STANDBY_AWAKE
@ RCL_POWER_STANDBY_AWAKE
Definition: hal.h:68
hal_setup_sync_found_cap
void hal_setup_sync_found_cap(void)
Definition: hal_cc23x0rx.c:247
hal_setup_setup_time
void hal_setup_setup_time(uint32_t setupTime)
Definition: hal_cc23x0rx.c:170
hal_set_systim_imask
void hal_set_systim_imask(void)
Definition: hal_cc23x0rx.c:391
hal_power_release_constraint
void hal_power_release_constraint(void)
Definition: hal_cc23x0rx.c:362
RF_dispatchHwi
static void RF_dispatchHwi(uintptr_t a)
Definition: hal_cc23x0rx.c:79
hal_enable_setup_time_irq
void hal_enable_setup_time_irq(void)
Definition: hal_cc23x0rx.c:165
hal.h
HalTimerEvent
HalTimerEvent
Definition: hal.h:59
hal_setup_hard_stop_time
void hal_setup_hard_stop_time(uint32_t time)
Definition: hal_cc23x0rx.c:184
channel2usage
enum @24 channel2usage
halDispatchFsmCb
void(* halDispatchFsmCb)(void)
Definition: hal_cc23x0rx.c:78
hal_setup_start_time
void hal_setup_start_time(uint32_t time)
Definition: hal_cc23x0rx.c:177
hal_cancel_start_time
void hal_cancel_start_time(void)
Definition: hal_cc23x0rx.c:215
hal_init_fsm
void hal_init_fsm(void(*setupFsmCb)(void), void(*schedFsmCb)(void), void(*commandFsmCb)(void))
Definition: hal_cc23x0rx.c:115
SYSTIM_CH2_STOP
@ SYSTIM_CH2_STOP
Definition: hal_cc23x0rx.c:162
commandHwi
static HwiP_Struct commandHwi
Definition: hal_cc23x0rx.c:88
hal_check_clear_timer_compare
HalTimerEvent hal_check_clear_timer_compare(void)
Definition: hal_cc23x0rx.c:258
RCL_POWER_XTAL_AVAILABLE
@ RCL_POWER_XTAL_AVAILABLE
Definition: hal.h:69
hal_get_ifg_reg
uint32_t hal_get_ifg_reg(void)
Definition: hal_cc23x0rx.c:99
hal_set_systim_imask
void hal_set_systim_imask(void)
Definition: hal_cc23x0rx.c:391
hal_enable_clk_buffer
void hal_enable_clk_buffer(void)
Definition: hal_cc23x0rx.c:239
hal_power_set_constraint
void hal_power_set_constraint(void)
Definition: hal_cc23x0rx.c:353
hal_trigger_dispatch_fsm
void hal_trigger_dispatch_fsm(void)
Definition: hal_cc23x0rx.c:142
hal_disable_radio_interrupts
void hal_disable_radio_interrupts(void)
Definition: hal_cc23x0rx.c:293
hal_setup_hard_stop_time
void hal_setup_hard_stop_time(uint32_t stopTime)
Definition: hal_cc23x0rx.c:184
RCL_PowerEvent
RCL_PowerEvent
Definition: hal.h:67
hal_cancel_graceful_stop_time
void hal_cancel_graceful_stop_time(void)
Definition: hal_cc23x0rx.c:231
HAL_TIMER_EVT_GRACEFUL_STOP
@ HAL_TIMER_EVT_GRACEFUL_STOP
Definition: hal.h:63
hal_enable_setup_time_irq
void hal_enable_setup_time_irq(void)
Definition: hal_cc23x0rx.c:165
rclPowerNotify
static void(* rclPowerNotify)(RCL_PowerEvent)
Definition: hal_cc23x0rx.c:62
hal_cancel_graceful_stop_time
void hal_cancel_graceful_stop_time(void)
Definition: hal_cc23x0rx.c:231
dispatchHwi
static HwiP_Struct dispatchHwi
Definition: hal_cc23x0rx.c:77
hal_power_open
void hal_power_open(void(*f)(RCL_PowerEvent))
Definition: hal_cc23x0rx.c:371
hal_setup_graceful_stop_time
void hal_setup_graceful_stop_time(uint32_t stopTime)
Definition: hal_cc23x0rx.c:196
RF_commandHwi
static void RF_commandHwi(uintptr_t a)
Definition: hal_cc23x0rx.c:90
__attribute__
__attribute__((weak))
Definition: hal_cc23x0rx.c:401
powerXtalAvailableObj
Power_NotifyObj powerXtalAvailableObj
Definition: hal_cc23x0rx.c:61
hal_init_fsm
void hal_init_fsm(void(*dispatchFsmCb)(void), void(*schedFsmCb)(void), void(*commandFsmCb)(void))
Definition: hal_cc23x0rx.c:115
hal_power_set_constraint
void hal_power_set_constraint(void)
Definition: hal_cc23x0rx.c:353
hal_cancel_setup_time
void hal_cancel_setup_time(void)
Definition: hal_cc23x0rx.c:207
hal_trigger_command_fsm
void hal_trigger_command_fsm(void)
Definition: hal_cc23x0rx.c:136
hal_trigger_scheduler_fsm
void hal_trigger_scheduler_fsm()
Definition: hal_cc23x0rx.c:148
HAL_TIMER_EVT_NONE
@ HAL_TIMER_EVT_NONE
Definition: hal.h:60
hal_trigger_dispatch_fsm
void hal_trigger_dispatch_fsm(void)
Definition: hal_cc23x0rx.c:142
HAL_TIMER_EVT_START
@ HAL_TIMER_EVT_START
Definition: hal.h:62
lrfdClocked
static bool lrfdClocked
Definition: hal_cc23x0rx.c:299
hal_set_clkctl
void hal_set_clkctl(uint32_t clkctl)
Definition: hal_cc23x0rx.c:300
hal_setup_graceful_stop_time
void hal_setup_graceful_stop_time(uint32_t time)
Definition: hal_cc23x0rx.c:196
hal_power_close
void hal_power_close(void)
Definition: hal_cc23x0rx.c:382
hal_get_temperature
int16_t hal_get_temperature(void)
hal_check_clear_timer_compare
HalTimerEvent hal_check_clear_timer_compare(void)
Definition: hal_cc23x0rx.c:258
hal_cancel_hard_stop_time
void hal_cancel_hard_stop_time(void)
Definition: hal_cc23x0rx.c:223
schedHwi
static HwiP_Struct schedHwi
Definition: hal_cc23x0rx.c:65
HAL_TIMER_EVT_HARD_STOP
@ HAL_TIMER_EVT_HARD_STOP
Definition: hal.h:64
hal_set_clkctl
void hal_set_clkctl(uint32_t clkctl)
Definition: hal_cc23x0rx.c:300
hal_trigger_scheduler_fsm
void hal_trigger_scheduler_fsm(void)
Definition: hal_cc23x0rx.c:148
hal_power_open
void hal_power_open(void(*f)(RCL_PowerEvent))
Definition: hal_cc23x0rx.c:371
hal_cancel_hard_stop_time
void hal_cancel_hard_stop_time(void)
Definition: hal_cc23x0rx.c:223
hal_enable_clk_buffer
void hal_enable_clk_buffer(void)
Definition: hal_cc23x0rx.c:239
hal_get_current_time
uint32_t hal_get_current_time(void)
Definition: hal_cc23x0rx.c:154
hal_cancel_setup_time
void hal_cancel_setup_time(void)
Definition: hal_cc23x0rx.c:207
HAL_TIMER_EVT_SETUP
@ HAL_TIMER_EVT_SETUP
Definition: hal.h:61
hal_get_current_time
uint32_t hal_get_current_time(void)
Definition: hal_cc23x0rx.c:154
hal_enable_hard_stop_time_irq
void hal_enable_hard_stop_time_irq(void)
Definition: hal_cc23x0rx.c:191
hal_cancel_start_time
void hal_cancel_start_time(void)
Definition: hal_cc23x0rx.c:215
SYSTIM_CH2_START
@ SYSTIM_CH2_START
Definition: hal_cc23x0rx.c:161
hal_enable_hard_stop_time_irq
void hal_enable_hard_stop_time_irq(void)
Definition: hal_cc23x0rx.c:191
halCommandFsmCb
void(* halCommandFsmCb)(void)
Definition: hal_cc23x0rx.c:89
hal_arm_sync_found_cap
void hal_arm_sync_found_cap(void)
hal_enable_graceful_stop_time_irq
void hal_enable_graceful_stop_time_irq(void)
Definition: hal_cc23x0rx.c:202
hal_power_close
void hal_power_close(void)
Definition: hal_cc23x0rx.c:382
hal_enable_graceful_stop_time_irq
void hal_enable_graceful_stop_time_irq(void)
Definition: hal_cc23x0rx.c:202
hal_trigger_command_fsm
void hal_trigger_command_fsm(void)
Definition: hal_cc23x0rx.c:136
hal_setup_sync_found_cap
void hal_setup_sync_found_cap(void)
Definition: hal_cc23x0rx.c:247