123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include <stdarg.h>
- #include "yc11xx.h"
- #include "yc11xx_gpio.h"
- #include "yc11xx_uart.h"
- #include "yc_timer.h"
- #include "yc_otp.h"
- #include "system.h"
- #include "btreg.h"
- void otp_read_test(void)
- {
- uint8_t tmp[100];
- uint32_t i = 0;;
-
- MyPrintf("tmp=%p\r\n",tmp);
- read_otp_data(0x1fe0, tmp, 16);
- for (i = 0; i < 16; i++)
- {
- MyPrintf("%02x ",tmp[i]);
- }
- }
- int main(void)
- {
- #ifdef DEBUG_OTP
- printport_init();
- MyPrintf("This is YC11XX otp read demo v1.0. \n");
- #endif
- SYS_TimerInit();
- SYS_delay_ms(100);
- OS_ENTER_CRITICAL();
- otp_read_test();
- OS_EXIT_CRITICAL();
- while(1)
- {
- }
- }
|