From 7a8c601eec433f7c75d3291d64bb3d41fe50c8ae Mon Sep 17 00:00:00 2001 From: Thomas Albers Raviola Date: Tue, 3 Dec 2024 21:52:59 +0100 Subject: Use custom types --- src/i2c.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/i2c.c') diff --git a/src/i2c.c b/src/i2c.c index cca68c6..b7bf7ab 100644 --- a/src/i2c.c +++ b/src/i2c.c @@ -5,7 +5,7 @@ #define SCL (1 << 1) void -_delay_ms(uint8_t ms); +_delay_ms(u8 ms); void i2c_start_condition(void) @@ -36,9 +36,9 @@ i2c_stop_condition(void) } void -i2c_send(uint8_t b) +i2c_send(u8 b) { - uint8_t i; + u8 i; for (i = 0; i < 8; ++i) { if (b & 1) @@ -67,11 +67,11 @@ i2c_send(uint8_t b) port_a_ctrl = 0x7C; } -uint8_t -i2c_recv(uint8_t ack) +u8 +i2c_recv(u8 ack) { - uint8_t i; - uint8_t b = 0; + u8 i; + u8 b = 0; port_a_ctrl = PIO_MODE_3; port_a_ctrl = 0x7D; -- cgit v1.2.3