test_board.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #pragma once
  7. #include "sdkconfig.h"
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11. #if CONFIG_IDF_TARGET_ESP32
  12. #define I2C_SLAVE_SCL_IO 18 /*!<gpio number for i2c slave clock */
  13. #define I2C_SLAVE_SDA_IO 19 /*!<gpio number for i2c slave data */
  14. #define I2C_MASTER_SCL_IO 18 /*!< gpio number for I2C master clock */
  15. #define I2C_MASTER_SDA_IO 19 /*!< gpio number for I2C master data */
  16. #else
  17. #define I2C_SLAVE_SCL_IO 4 /*!<gpio number for i2c slave clock */
  18. #define I2C_SLAVE_SDA_IO 2 /*!<gpio number for i2c slave data */
  19. #define I2C_MASTER_SCL_IO 4 /*!< gpio number for I2C master clock */
  20. #define I2C_MASTER_SDA_IO 2 /*!< gpio number for I2C master data */
  21. #endif
  22. #define ESP_SLAVE_ADDR 0x28 /*!< ESP_I2C slave address, you can set any 7bit value */
  23. #define TEST_I2C_PORT 0
  24. #define DATA_LENGTH 100
  25. /**
  26. * @brief Display buffer
  27. *
  28. * @param buf Pointer to the buffer
  29. * @param len buffer length
  30. */
  31. void disp_buf(uint8_t *buf, int len);
  32. #ifdef __cplusplus
  33. }
  34. #endif