You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
602 B

2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <functional>
  4. #include "basic_type.hpp"
  5. //
  6. namespace iflytop {
  7. using namespace std;
  8. class I_EEPROMModule {
  9. public:
  10. #pragma pack(1)
  11. typedef struct {
  12. s32 connected;
  13. } eeprom_status_t;
  14. #pragma pack()
  15. public:
  16. virtual int32_t start_monitor_status(function<void(eeprom_status_t& status)> cb) = 0;
  17. virtual int32_t stop_monitor_status() = 0;
  18. virtual int32_t read(u16 sector_index, u16 sector_size, zcancmder_read_ram_ack_t& ack) = 0;
  19. virtual ~I_EEPROMModule() {}
  20. };
  21. } // namespace iflytop