diff options
| author | David Hoelscher <infinityis@users.noreply.github.com> | 2024-01-17 07:05:38 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-17 14:05:38 +0100 |
| commit | e9bd7d7ad308f9c72c86863bf9f19382c7e2d892 (patch) | |
| tree | c46ce87aaa57b8f49dc0a2b56527f0bc606038ab /drivers/painter | |
| parent | 2b0965944d9065daa65cd25540cf2dd007f23eda (diff) | |
I2C driver cleanup (#21273)
* remove i2c_start and i2c_stop from i2c drivers
* remove static i2c_address variable from chibios i2c driver
Diffstat (limited to 'drivers/painter')
| -rw-r--r-- | drivers/painter/comms/qp_comms_i2c.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/painter/comms/qp_comms_i2c.c b/drivers/painter/comms/qp_comms_i2c.c index ec45ddfb3b..93f503f3dd 100644 --- a/drivers/painter/comms/qp_comms_i2c.c +++ b/drivers/painter/comms/qp_comms_i2c.c | |||
| @@ -28,18 +28,14 @@ bool qp_comms_i2c_init(painter_device_t device) { | |||
| 28 | } | 28 | } |
| 29 | 29 | ||
| 30 | bool qp_comms_i2c_start(painter_device_t device) { | 30 | bool qp_comms_i2c_start(painter_device_t device) { |
| 31 | painter_driver_t * driver = (painter_driver_t *)device; | 31 | return true; |
| 32 | qp_comms_i2c_config_t *comms_config = (qp_comms_i2c_config_t *)driver->comms_config; | ||
| 33 | return i2c_start(comms_config->chip_address << 1) == I2C_STATUS_SUCCESS; | ||
| 34 | } | 32 | } |
| 35 | 33 | ||
| 36 | uint32_t qp_comms_i2c_send_data(painter_device_t device, const void *data, uint32_t byte_count) { | 34 | uint32_t qp_comms_i2c_send_data(painter_device_t device, const void *data, uint32_t byte_count) { |
| 37 | return qp_comms_i2c_send_raw(device, data, byte_count); | 35 | return qp_comms_i2c_send_raw(device, data, byte_count); |
| 38 | } | 36 | } |
| 39 | 37 | ||
| 40 | void qp_comms_i2c_stop(painter_device_t device) { | 38 | void qp_comms_i2c_stop(painter_device_t device) {} |
| 41 | i2c_stop(); | ||
| 42 | } | ||
| 43 | 39 | ||
| 44 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 40 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 45 | // Command+Data I2C support | 41 | // Command+Data I2C support |
