• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 #include "hal_config.h"
22 #include "power_ll.h"
23 
24 
25 //power up/down each module
26 #define power_hal_uart_pwr_up(hal, id) power_ll_pwr_up_uart((hal)->hw, (id))
27 #define power_hal_uart_pwr_down(hal, id) power_ll_pwr_down_uart((hal)->hw, (id))
28 
29 #define power_hal_i2c_pwr_up(hal, id) power_ll_pwr_up_i2c((hal)->hw, id)
30 #define power_hal_i2c_pwr_down(hal, id) power_ll_pwr_down_i2c((hal)->hw, id)
31 
32 #define power_hal_irda_pwr_up(hal) power_ll_pwr_up_irda((hal)->hw)
33 #define power_hal_irda_pwr_down(hal) power_ll_pwr_down_irda((hal)->hw)
34 
35 #define power_hal_i2s_pcm_pwr_up(hal) power_ll_pwr_up_i2s_pcm((hal)->hw)
36 #define power_hal_i2s_pcm_pwr_down(hal) power_ll_pwr_down_i2s_pcm((hal)->hw)
37 
38 #define power_hal_pwr_up_spi(hal, id) power_ll_pwr_up_spi((hal)->hw, id)
39 #define power_hal_pwr_down_spi(hal, id) power_ll_pwr_down_spi((hal)->hw, id)
40 
41 #define power_hal_saradc_pwr_up(hal) power_ll_pwr_up_saradc((hal)->hw)
42 #define power_hal_saradc_pwr_down(hal) power_ll_pwr_down_saradc((hal)->hw)
43 
44 #define power_hal_arm_wdt_pwr_up(hal) power_ll_pwr_up_arm_wdt((hal)->hw)
45 #define power_hal_arm_wdt_pwr_down(hal) power_ll_pwr_down_arm_wdt((hal)->hw)
46 
47 #define power_hal_pwm_pwr_up(hal, chan) power_ll_pwm_pwr_up((hal)->hw, (chan))
48 #define power_hal_pwm_pwr_down(hal, chan) power_ll_pwm_pwr_down((hal)->hw, (chan))
49 
50 #define power_hal_audio_pwr_up(hal) power_ll_pwr_up_audio((hal)->hw)
51 #define power_hal_audio_pwr_down(hal) power_ll_pwr_down_audio((hal)->hw)
52 
53 #define power_hal_tl410_wdt_pwr_up(hal) power_ll_pwr_up_tl410_wdt((hal)->hw)
54 #define power_hal_tl410_wdt_pwr_down(hal) power_ll_pwr_down_tl410_wdt((hal)->hw)
55 
56 #define power_hal_sdio_pwr_up(hal) power_ll_pwr_up_sdio((hal)->hw)
57 #define power_hal_sdio_pwr_down(hal) power_ll_pwr_down_sdio((hal)->hw)
58 
59 #define power_hal_usb_pwr_up(hal, id) power_ll_pwr_up_usb((hal)->hw, id)
60 #define power_hal_usb_pwr_down(hal, id) power_ll_pwr_down_usb((hal)->hw, id)
61 
62 #define power_hal_fft_pwr_up(hal) power_ll_pwr_up_fft((hal)->hw)
63 #define power_hal_fft_pwr_down(hal) power_ll_pwr_down_fft((hal)->hw)
64 
65 #define power_hal_pwr_up_timer(hal, timer_id) power_ll_pwr_up_timer((hal)->hw, (timer_id))
66 #define power_hal_pwr_down_timer(hal, timer_id) power_ll_pwr_down_timer((hal)->hw, (timer_id))
67 
68 #define power_hal_jpeg_pwr_up(hal) power_ll_pwr_up_jpeg((hal)->hw)
69 #define power_hal_jpeg_pwr_down(hal) power_ll_pwr_down_jpeg((hal)->hw)
70 
71 #define power_hal_qspi_pwr_up(hal) power_ll_pwr_up_qspi((hal)->hw)
72 #define power_hal_qspi_pwr_down(hal) power_ll_pwr_down_qspi((hal)->hw)
73 
74 #define power_hal_ble_pwr_up(hal) power_ll_pwr_up_ble((hal)->hw)
75 #define power_hal_ble_pwr_down(hal) power_ll_pwr_down_ble((hal)->hw)
76 
77 #define power_hal_tl410_pwr_up(hal) power_ll_pwr_up_tl410((hal)->hw)
78 #define power_hal_tl410_pwr_down(hal) power_ll_pwr_down_tl410((hal)->hw)
79 
80 #define power_hal_security_pwr_up(hal) power_ll_pwr_up_security((hal)->hw)
81 #define power_hal_security_pwr_down(hal) power_ll_pwr_down_security((hal)->hw)
82 
83 #define power_hal_cec_pwr_up(hal) power_ll_pwr_up_cec((hal)->hw)
84 #define power_hal_cec_pwr_down(hal) power_ll_pwr_down_cec((hal)->hw)
85 
86 #define power_hal_sdio_dma_pwr_up(hal) power_ll_pwr_up_sdio_dma((hal)->hw)
87 #define power_hal_sdio_dma_pwr_down(hal) power_ll_pwr_down_sdio_dma((hal)->hw)
88 
89 #define power_hal_pwr_up_wdt(hal) power_ll_pwr_up_wdt((hal)->hw)
90 #define power_hal_pwr_down_wdt(hal) power_ll_pwr_down_wdt((hal)->hw)
91 
92 #ifdef __cplusplus
93 }
94 #endif
95