1 /* 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 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 16 #ifndef __EFUSE_H__ 17 #define __EFUSE_H__ 18 #include "efuse_drv.h" 19 20 #define EIGHT_BITS 8 21 #define THREE_BITS_OFFSET 3 22 #define SIZE_8_BITS 8 23 #define SIZE_16_BITS 16 24 #define SIZE_24_BITS 24 25 #define SIZE_32_BITS 32 26 #define SIZE_64_BITS 64 27 #define SIZE_72_BITS 72 28 #define DATA_LENGTH 4 29 30 hi_u32 efuse_bits_read(hi_u16 start_bit, hi_u16 size, hi_u8 *data, hi_u32 data_len); 31 hi_u32 efuse_bits_write(hi_u16 start_bit, hi_u16 size, const hi_u8 *key_data); 32 33 #endif /* __EFUSE_H__ */ 34 35