avr_isp_view_writer.h 1015 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #pragma once
  2. #include <gui/view.h>
  3. #include "../helpers/avr_isp_types.h"
  4. #include "../helpers/avr_isp_event.h"
  5. typedef struct AvrIspWriterView AvrIspWriterView;
  6. typedef void (*AvrIspWriterViewCallback)(AvrIspCustomEvent event, void* context);
  7. typedef enum {
  8. AvrIspWriterViewStatusIDLE,
  9. AvrIspWriterViewStatusWriting,
  10. AvrIspWriterViewStatusVerification,
  11. AvrIspWriterViewStatusWritingFuse,
  12. AvrIspWriterViewStatusWritingFuseOk,
  13. } AvrIspWriterViewStatus;
  14. void avr_isp_writer_update_progress(AvrIspWriterView* instance);
  15. void avr_isp_writer_set_file_path(
  16. AvrIspWriterView* instance,
  17. const char* file_path,
  18. const char* file_name);
  19. void avr_isp_writer_view_set_callback(
  20. AvrIspWriterView* instance,
  21. AvrIspWriterViewCallback callback,
  22. void* context);
  23. AvrIspWriterView* avr_isp_writer_view_alloc();
  24. void avr_isp_writer_view_free(AvrIspWriterView* instance);
  25. View* avr_isp_writer_view_get_view(AvrIspWriterView* instance);
  26. void avr_isp_writer_view_exit(void* context);