diff options
author | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-12-03 21:52:59 +0100 |
---|---|---|
committer | Thomas Albers Raviola <thomas@thomaslabs.org> | 2024-12-03 21:52:59 +0100 |
commit | 7a8c601eec433f7c75d3291d64bb3d41fe50c8ae (patch) | |
tree | 1b1038a4dc80cc496a4c608ea760300f8b6d68f1 /src/i2c.c | |
parent | 08b7ee440269c881546421da6efe1b6ae122b566 (diff) |
Use custom types
Diffstat (limited to 'src/i2c.c')
-rw-r--r-- | src/i2c.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -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; |