m_easyflash.c 778 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2024-12-28 Administrator the first version
  9. */
  10. #include <rtthread.h>
  11. #include <board.h>
  12. #include <rtdevice.h>
  13. #include <easyflash.h>
  14. #define DBG_ENABLE
  15. #define DBG_COLOR
  16. #define DBG_TAG "easyflash"
  17. #define DBG_LEVEL DBG_LOG
  18. #include <rtdbg.h> //must after of DBG_LVL, DBG_TAG or other options
  19. static int Init_EasyFlash(void)
  20. {
  21. if(easyflash_init()==EF_NO_ERR) //初始化成功
  22. {
  23. LOG_I("EasyFlash init Successful!");
  24. }else{
  25. LOG_E("EasyFlash init ERROR!!!");
  26. return -1;
  27. }
  28. return 0;
  29. }
  30. void Read_EasyFlash_Param(void)
  31. {
  32. }
  33. INIT_APP_EXPORT(Init_EasyFlash);