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.

33 lines
602 B

2 years ago
  1. #pragma once
  2. #include <stdint.h>
  3. #include <functional>
  4. #include "sdk\components\zprotocols\zcancmder_v2\api\errorcode.hpp"
  5. namespace iflytop {
  6. using namespace std;
  7. typedef enum {
  8. kp24c16,
  9. km24lrxxe,
  10. } eeprom_type_t;
  11. class ZI_EEPROM {
  12. public:
  13. virtual ~ZI_EEPROM() {}
  14. public:
  15. /**
  16. * @brief
  17. *
  18. * @param add 4byte
  19. * @param val
  20. * @param len 4ı
  21. * @return int32_t
  22. */
  23. virtual int32_t write(int32_t add, uint8_t* val, int32_t *len) = 0;
  24. virtual int32_t read(int32_t add, uint8_t* val, int32_t *len) = 0;
  25. virtual bool isOnline() = 0;
  26. };
  27. } // namespace iflytop