hal_flash.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * BSD 2-Clause License
  3. * Copyright (c) 2022, LiteEMF
  4. * All rights reserved.
  5. * This software component is licensed by LiteEMF under BSD 2-Clause license,
  6. * the "License"; You may not use this file except in compliance with the
  7. * License. You may obtain a copy of the License at:
  8. * opensource.org/licenses/BSD-2-Clause
  9. *
  10. */
  11. #ifndef _hal_flash_h
  12. #define _hal_flash_h
  13. #include "emf_typedef.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. /******************************************************************************************************
  18. ** Defined
  19. *******************************************************************************************************/
  20. #ifndef API_FLASH_PAGE_NUM
  21. #define API_FLASH_PAGE_NUM 2
  22. #endif
  23. #ifndef API_FLASH_PAGE_SIZE
  24. #define API_FLASH_PAGE_SIZE 0x100
  25. #endif
  26. #ifndef API_FLASH_ADDRESS
  27. #define API_FLASH_ADDRESS (0x08010000 - API_FLASH_PAGE_SIZE*API_FLASH_PAGE_NUM)
  28. #endif
  29. /******************************************************************************************************
  30. ** Parameters
  31. *******************************************************************************************************/
  32. /*****************************************************************************************************
  33. ** Function
  34. ******************************************************************************************************/
  35. #ifdef __cplusplus
  36. }
  37. #endif
  38. #endif