flash.h 615 B

123456789101112131415161718192021
  1. #ifndef INC_FLASH_H_
  2. #define INC_FLASH_H_
  3. /* Includes ------------------------------------------------------------------*/
  4. #include <stdint.h>
  5. #include <stdbool.h>
  6. #include "stm32f4xx_board.h"
  7. int flash_erase_page(uint32_t address);
  8. int flash_erase_pages(uint32_t address, uint32_t size);
  9. int flash_erase_app(uint8_t app_num);
  10. void app_status_set(uint8_t app_num,bool status);
  11. int flash_write_page(uint32_t target_addr, uint8_t *data, uint32_t length, bool erase);
  12. int flash_test(void);
  13. void app1_copy_to_app2(void);
  14. void app2_copy_to_app1(void);
  15. void jump_to_app(uint32_t app_addr);
  16. #endif /* INC_FLASH_H_ */