1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef __YC_OTP_H__
- #define __YC_OTP_H__
- #include "yc11xx.h"
- #include "yc11xx_uart.h"
- #include "yc_timer.h"
- #include <string.h>
- #define CHARGEPUMP_DELAY 300
- #define OTP_START 0x01
- #define packagelen 0x20
- /*
- * @brief: OTP deint
- * @param: none
- * @return: none
- */
- void deinit_otp(void);
- /*
- * @brief: OTP init
- * @param: none
- * @return: none
- */
- void init_otp(void);
- /*
- * @brief:read otp
- * @param:addr
- * @param:*data
- * @param: len
- * @return: none
- */
- void read_otp(uint32_t addr,uint8_t *data,uint32_t len);
- /*
- * @brief:OTP read data
- * @param:addr
- * @param:*data
- * @param: len
- * @return: none
- */
- void read_otp_data(uint32_t addr,uint8_t *data,uint32_t len);
- uint8_t otp_program_bit(uint32_t addr);
- /*
- * @brief:write otp
- * @param:addr
- * @param:*data
- * @param: len
- * @return: none
- */
- void write_otp(uint32_t addr,uint8_t *data,uint32_t len);
- #endif
|