i2c_slave.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _i2c_slave_h
  2. #define _i2c_slave_h
  3. //CONFIG_SUPPORT_U2I_UPGRADE=> enable U2I_UPGRADE function at which port run as hdmi edid function
  4. //CONFIG_DDC_CI_SUPPORT => enable U2I_UPGRADE function at which port run as ddc ci function
  5. #if defined(CONFIG_DDC_CI_SUPPORT)
  6. #else
  7. #if defined(CONFIG_SUPPORT_U2I_UPGRADE)
  8. //select hdmi1 as U2I interface
  9. #if (((CONFIG_HDMI_PORT_MAP >> (0 * 4)) & 0xF) == 1)
  10. #define I2C_SLAVE_0_SUPPORT_U2I_UPGRADE
  11. #endif
  12. #if (((CONFIG_HDMI_PORT_MAP >> (1 * 4)) & 0xF) == 1)
  13. #define I2C_SLAVE_1_SUPPORT_U2I_UPGRADE
  14. #endif
  15. //#define I2C_SLAVE_2_SUPPORT_U2I_UPGRADE
  16. #if (((CONFIG_HDMI_PORT_MAP >> (2 * 4)) & 0xF) == 1)
  17. #define I2C_SLAVE_3_SUPPORT_U2I_UPGRADE
  18. #endif
  19. //#define I2C_SLAVE_4_SUPPORT_U2I_UPGRADE
  20. #endif
  21. #endif
  22. void i2c_slave_set_response(unsigned int value);
  23. void i2c_slave_set_recv_addr(unsigned int *recv_addr);
  24. void i2c_slave_set_ram_value(unsigned int addr, unsigned int *data, unsigned int data_len);
  25. void i2c_slave_get_request(void *req_buf);
  26. unsigned int i2c_slave_get_recv_pos(void);
  27. void i2c_slave_set_recv_pos(unsigned int pos);
  28. void i2c_slave_erase_request(void);
  29. #endif