Skip to content

Commit 1450273

Browse files
committed
stm32/machine_i2c_target: Change to size_t return.
Signed-off-by: Damien George <[email protected]>
1 parent d624350 commit 1450273

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ports/stm32/machine_i2c_target.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,15 @@ static void mp_machine_i2c_target_event_callback(machine_i2c_target_irq_obj_t *i
111111
mp_irq_handler(&irq->base);
112112
}
113113

114-
static mp_int_t mp_machine_i2c_target_read_bytes(machine_i2c_target_obj_t *self, size_t len, uint8_t *buf) {
114+
static size_t mp_machine_i2c_target_read_bytes(machine_i2c_target_obj_t *self, size_t len, uint8_t *buf) {
115115
if (len > 0) {
116116
buf[0] = i2c_slave_read_byte(self->i2c);
117117
len = 1;
118118
}
119119
return len;
120120
}
121121

122-
static mp_int_t mp_machine_i2c_target_write_bytes(machine_i2c_target_obj_t *self, size_t len, const uint8_t *buf) {
122+
static size_t mp_machine_i2c_target_write_bytes(machine_i2c_target_obj_t *self, size_t len, const uint8_t *buf) {
123123
if (len > 0) {
124124
i2c_slave_write_byte(self->i2c, buf[0]);
125125
len = 1;

0 commit comments

Comments
 (0)