• 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 #include "hal_config.h"
18 #include "prro_hw.h"
19 #include "prro_ll.h"
20 #include <driver/hal/hal_prro_types.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 typedef struct {
27 	prro_hw_t *hw;
28 } prro_hal_t;
29 
30 #define prro_hal_set_privilege_attribute(hal, dev, privilege_type) prro_ll_set_privilege_attribute((hal)->hw, dev, privilege_type)
31 #define prro_hal_set_secure_attribute(hal, dev, secure_type) prro_ll_set_secure_attribute((hal)->hw, dev, secure_type)
32 
33 bk_err_t prro_hal_init(prro_hal_t *hal);
34 
35 #if CFG_HAL_DEBUG_PRRO
36 void prro_struct_dump(void);
37 #else
38 #define prro_struct_dump()
39 #endif
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 
45