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 typedef volatile struct { 22 union { 23 struct { 24 uint32_t en: 1; /**< bit[0] efuse operate enable, sw set 1, hw clear it after operate finished*/ 25 uint32_t dir: 1; /**< bit[1] efuse operate direction. 0: read, 1: write */ 26 uint32_t reserved0: 6; /**< bit[2:7] */ 27 uint32_t addr: 5; /**< bit[8:12] efuse operate address */ 28 uint32_t reserved1: 3; /**< bit[13:15] */ 29 uint32_t wr_data: 8; /**< bit[16:23] efuse write data */ 30 uint32_t reserved3: 7; /**< bit[24:30] */ 31 uint32_t vdd25_en: 1; /**< bit[31] efuse vdd25 enable */ 32 }; 33 uint32_t v; 34 } ctrl; 35 36 union { 37 struct { 38 uint32_t rd_data: 8; /**< bit[0:7] efuse read operate data */ 39 uint32_t rd_data_valid: 1; /**< bit[8] efuse read data valid indication */ 40 uint32_t reserved: 23; /**< bit[9:31] */ 41 }; 42 uint32_t v; 43 } optr; 44 } efuse_hw_t; 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 51