A31L12x F/W Packages  1.4.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31L12x_hal_sculv.h
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 #ifndef _SCULV_H_
36 #define _SCULV_H_
37 
38 #include "A31L12x.h"
39 #include "A31L12x_hal_aa_types.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 //******************************************************************************
46 // Constant
47 //******************************************************************************
48 
49 // LVI Enable/Disable Control
50 /*
51 #define LVI_DIS (0x00uL << 7)
52 #define LVI_EN (0x01uL << 7)
53 */
54 #define LVIEN_Disable (SCULV_LVICR_LVIEN_Disable << SCULV_LVICR_LVIEN_Pos)
55 #define LVIEN_Enable (SCULV_LVICR_LVIEN_Enable << SCULV_LVICR_LVIEN_Pos)
56 
57 // LVI Interrupt Enable/Disable Control
58 /*
59 #define LVI_INT_DIS (0x00uL << 5)
60 #define LVI_INT_EN (0x01uL << 5)
61 */
62 #define LVINTEN_Disable (SCULV_LVICR_LVINTEN_Disable << SCULV_LVICR_LVINTEN_Pos)
63 #define LVINTEN_Enable (SCULV_LVICR_LVINTEN_Enable << SCULV_LVICR_LVINTEN_Pos)
64 
65 // LVI Voltage Selection Control
66 /*
67 #define LV_1DOT88 (0x03uL)
68 #define LV_2DOT00 (0x04uL)
69 #define LV_2DOT13 (0x05uL)
70 #define LV_2DOT28 (0x06uL)
71 #define LV_2DOT46 (0x07uL)
72 #define LV_2DOT67 (0x08uL)
73 #define LV_3DOT04 (0x09uL)
74 #define LV_3DOT20 (0x0AuL)
75 #define LV_3DOT55 (0x0BuL)
76 #define LV_3DOT75 (0x0CuL)
77 #define LV_3DOT99 (0x0DuL)
78 #define LV_4DOT25 (0x0EuL)
79 #define LV_4DOT55 (0x0FuL)
80 */
81 #define LVIVS_1p75V0 (SCULV_LVICR_LVIVS_1p75V0 << SCULV_LVICR_LVIVS_Pos) // 1.75V */
82 #define LVIVS_1p75V1 (SCULV_LVICR_LVIVS_1p75V1 << SCULV_LVICR_LVIVS_Pos) // 1.75V */
83 #define LVIVS_1p90V (SCULV_LVICR_LVIVS_1p90V << SCULV_LVICR_LVIVS_Pos) // 1.90V */
84 #define LVIVS_2p05V (SCULV_LVICR_LVIVS_2p05V << SCULV_LVICR_LVIVS_Pos) // 2.05V */
85 #define LVIVS_2p20V (SCULV_LVICR_LVIVS_2p20V << SCULV_LVICR_LVIVS_Pos) // 2.20V */
86 #define LVIVS_2p35V (SCULV_LVICR_LVIVS_2p35V << SCULV_LVICR_LVIVS_Pos) // 2.35V */
87 #define LVIVS_2p50V (SCULV_LVICR_LVIVS_2p50V << SCULV_LVICR_LVIVS_Pos) // 2.50V */
88 #define LVIVS_2p65V (SCULV_LVICR_LVIVS_2p65V << SCULV_LVICR_LVIVS_Pos) // 2.65V */
89 
90 //******************************************************************************
91 // Macro
92 //******************************************************************************
93 
94 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
98 #define SCULV_DisLVR() (SCULV->LVRCR_b.LVREN = 0x55)
99 #define SCULV_EnLVR() (SCULV->LVRCR_b.LVREN = 0x8A)
100 
101 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
105 #define SCULV_EnLviInt() (SCULV->LVICR_b.LVINTEN = 1)
106 #define SCULV_DisLviInt() (SCULV->LVICR_b.LVINTEN = 0)
107 
108 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
112 #define SCULV_GetLviFlag() (SCULV->LVICR_b.LVIFLAG)
113 #define SCULV_ClrLviFlag() (SCULV->LVICR_b.LVIFLAG = 1)
114 
115 //******************************************************************************
116 // Function
117 //******************************************************************************
118 
119 void HAL_LVI_Init( uint32_t u32LviEnBit, uint32_t u32LviIntEnBit, uint32_t u32LviLevel );
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif /* _SCULV_H_ */
126 
Contains the ABOV typedefs for C standard types. It is intended to be used in ISO C conforming develo...
void HAL_LVI_Init(uint32_t u32LviEnBit, uint32_t u32LviIntEnBit, uint32_t u32LviLevel)
Set LVI Block Enable/Disable and Voltage Level.