WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hal_tcxo_v150_regs_op.h
浏览该文件的文档.
1
10#ifndef HAL_TCXO_V150_REGS_OP_H
11#define HAL_TCXO_V150_REGS_OP_H
12
13#include <stdint.h>
14#include "errcode.h"
16#include "tcxo_porting.h"
17
18#ifdef __cplusplus
19#if __cplusplus
20extern "C" {
21#endif /* __cplusplus */
22#endif /* __cplusplus */
23
31
35static inline void hal_tcxo_status_set_enable(void)
36{
37 tcxo_status_data_t status;
38 status.d32 = g_tcxo_regs->status;
39 status.b.enable = 1;
40 g_tcxo_regs->status = status.d32;
41}
42
46static inline uint32_t hal_tcxo_status_get_enable(void)
47{
48 tcxo_status_data_t status;
49 status.d32 = g_tcxo_regs->status;
50 return status.b.enable;
51}
52
56static inline void hal_tcxo_status_set_clear(void)
57{
58 tcxo_status_data_t status;
59 status.d32 = g_tcxo_regs->status;
60 status.b.clear = 1;
61 g_tcxo_regs->status = status.d32;
62}
63
67static inline void hal_tcxo_status_set_refresh(void)
68{
69 tcxo_status_data_t status;
70 status.d32 = g_tcxo_regs->status;
71 status.b.refresh = 1;
72 g_tcxo_regs->status = status.d32;
73}
74
78static inline uint32_t hal_tcxo_status_get_valid(void)
79{
80 tcxo_status_data_t status;
81 status.d32 = g_tcxo_regs->status;
82 return status.b.valid;
83}
84
91
96
102
107#ifdef __cplusplus
108#if __cplusplus
109}
110#endif /* __cplusplus */
111#endif /* __cplusplus */
112
113#endif
uint32_t errcode_t
Definition of error code.
Definition errcode.h:30
errcode_t hal_tcxo_v150_regs_init(void)
Init the tcxo which will set the base address of registers.
Definition hal_tcxo_v150_regs_op.c:16
tcxo_regs_t * g_tcxo_regs
Definition hal_tcxo_v150_regs_op.c:14
void hal_tcxo_v150_regs_deinit(void)
Deinit the tcxo which will clear the base address of registers has been set by hal_tcxo_v150_regs_ini...
Definition hal_tcxo_v150_regs_op.c:27
uint64_t hal_tcxo_reg_count_get(void)
Get the value of count.
Definition hal_tcxo_v150_regs_op.c:32
unsigned long long uint64_t
Definition osal_types.h:35
Registers associated with TCXO.
Definition hal_tcxo_v150_regs_def.h:62
volatile uint32_t status
Definition hal_tcxo_v150_regs_def.h:63
This union represents the bit fields in the count register. Read the register into the d32 member the...
Definition hal_tcxo_v150_regs_def.h:48
uint32_t refresh
Definition hal_tcxo_v150_regs_def.h:51
uint32_t d32
Definition hal_tcxo_v150_regs_def.h:49
uint32_t valid
Definition hal_tcxo_v150_regs_def.h:55
uint32_t clear
Definition hal_tcxo_v150_regs_def.h:52
struct tcxo_status_data::@30 b
uint32_t enable
Definition hal_tcxo_v150_regs_def.h:53