diff options
| author | Your Name <you@example.com> | 2026-05-18 22:44:37 +0530 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-05-18 22:44:37 +0530 |
| commit | f2c4b15c72a2fa89caed5d8a11a4ea9832c48be6 (patch) | |
| tree | 4cfaa400b1bddcd6cff2a5e53f3789256c40700d /tests/unit/stubs/driver/i2c_master.h | |
| parent | 7820837d79ebc8e00221b5206bdd8e3ca0ae4c15 (diff) | |
feat: add AXS15231B touch driver with coordinate parsing tests
Diffstat (limited to 'tests/unit/stubs/driver/i2c_master.h')
| -rw-r--r-- | tests/unit/stubs/driver/i2c_master.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/unit/stubs/driver/i2c_master.h b/tests/unit/stubs/driver/i2c_master.h new file mode 100644 index 0000000..f49eaad --- /dev/null +++ b/tests/unit/stubs/driver/i2c_master.h | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #ifndef STUBS_DRIVER_I2C_MASTER_H | ||
| 2 | #define STUBS_DRIVER_I2C_MASTER_H | ||
| 3 | |||
| 4 | #include "driver/i2c_types.h" | ||
| 5 | #include "esp_err.h" | ||
| 6 | #include <stdint.h> | ||
| 7 | #include <stddef.h> | ||
| 8 | |||
| 9 | static inline esp_err_t i2c_new_master_bus(const i2c_master_bus_config_t *cfg, i2c_master_bus_handle_t *ret) { | ||
| 10 | (void)cfg; (void)ret; | ||
| 11 | return ESP_OK; | ||
| 12 | } | ||
| 13 | |||
| 14 | static inline esp_err_t i2c_master_bus_add_device(i2c_master_bus_handle_t bus, const i2c_device_config_t *cfg, i2c_master_dev_handle_t *ret) { | ||
| 15 | (void)bus; (void)cfg; (void)ret; | ||
| 16 | return ESP_OK; | ||
| 17 | } | ||
| 18 | |||
| 19 | static inline esp_err_t i2c_master_transmit(i2c_master_dev_handle_t dev, const uint8_t *buf, size_t len, int timeout_ms) { | ||
| 20 | (void)dev; (void)buf; (void)len; (void)timeout_ms; | ||
| 21 | return ESP_OK; | ||
| 22 | } | ||
| 23 | |||
| 24 | static inline esp_err_t i2c_master_receive(i2c_master_dev_handle_t dev, uint8_t *buf, size_t len, int timeout_ms) { | ||
| 25 | (void)dev; (void)buf; (void)len; (void)timeout_ms; | ||
| 26 | return ESP_OK; | ||
| 27 | } | ||
| 28 | |||
| 29 | static inline esp_err_t i2c_master_bus_rm_device(i2c_master_dev_handle_t dev) { | ||
| 30 | (void)dev; | ||
| 31 | return ESP_OK; | ||
| 32 | } | ||
| 33 | |||
| 34 | static inline esp_err_t i2c_del_master_bus(i2c_master_bus_handle_t bus) { | ||
| 35 | (void)bus; | ||
| 36 | return ESP_OK; | ||
| 37 | } | ||
| 38 | |||
| 39 | #endif | ||