flash.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) Siddharth Bharat Purohit 2017
  3. * This file is free software: you can redistribute it and/or modify it
  4. * under the terms of the GNU General Public License as published by the
  5. * Free Software Foundation, either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This file is distributed in the hope that it will be useful, but
  9. * WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. * See the GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along
  14. * with this program. If not, see <http://www.gnu.org/licenses/>.
  15. */
  16. #include "hal.h"
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. uint32_t stm32_flash_getpageaddr(uint32_t page);
  21. uint32_t stm32_flash_getpagesize(uint32_t page);
  22. uint32_t stm32_flash_getnumpages(void);
  23. bool stm32_flash_erasepage(uint32_t page);
  24. bool stm32_flash_write(uint32_t addr, const void *buf, uint32_t count);
  25. void stm32_flash_keep_unlocked(bool set);
  26. bool stm32_flash_ispageerased(uint32_t page);
  27. #ifdef __cplusplus
  28. }
  29. #endif