/* * Copyright (c) Hisilicon Technologies Co., Ltd. 2019-2021. All rights reserved. * Description:OTP driver in register level. * Author: Hisilicon * Create: 2019/06/21 */ #ifndef HAL_OTP_H #define HAL_OTP_H #include "drv_otp_define.h" #include "hal_otp_reg.h" td_s32 hal_otp_init(td_void); td_void hal_otp_deinit(td_void); td_s32 hal_otp_reset(td_void); td_s32 hal_otp_read(td_u32 addr, td_u32 *value); td_s32 hal_otp_read_byte(td_u32 addr, td_u8 *value); td_s32 hal_otp_read_bits_onebyte(td_u32 addr, td_u32 start_bit, td_u32 bit_width, td_u8 *value); td_s32 hal_otp_write(td_u32 addr, td_u32 value); td_s32 hal_otp_write_byte(td_u32 addr, td_u8 value); td_s32 hal_otp_write_bit(td_u32 addr, td_u32 bit_pos); td_s32 hal_otp_write_bits_onebyte(td_u32 addr, td_u32 start_bit, td_u32 bit_width, td_u8 value); #endif /* HAL_OTP_H */