Skip to content

Commit 9600dec

Browse files
committed
fix build issues on GCC 12
1 parent 8649633 commit 9600dec

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

i2c/ht16k33_i2c/ht16k33_i2c.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ int16_t num[] = {
8080
}
8181

8282
/* Quick helper function for single byte transfers */
83-
inline void i2c_write_byte(uint8_t val) {
83+
void i2c_write_byte(uint8_t val) {
8484
#ifdef i2c_default
8585
i2c_write_blocking(i2c_default, I2C_addr, &val, 1, false);
8686
#endif
@@ -99,7 +99,9 @@ static inline void ht16k33_display_set(int position, uint16_t bin) {
9999
buf[0] = position * 2;
100100
buf[1] = bin & 0xff;
101101
buf[2] = bin >> 8;
102+
#ifdef i2c_default
102103
i2c_write_blocking(i2c_default, I2C_addr, buf, count_of(buf), false);
104+
#endif
103105
}
104106

105107
static inline void ht16k33_display_char(int position, char ch) {

i2c/ssd1306_i2c/ssd1306_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ void calc_render_area_buflen(struct render_area *area) {
101101

102102
#ifdef i2c_default
103103

104-
inline void SSD1306_send_cmd(uint8_t cmd) {
104+
void SSD1306_send_cmd(uint8_t cmd) {
105105
// I2C write process expects a control byte followed by data
106106
// this "data" can be a command or data to follow up a command
107107
// Co = 1, D/C = 0 => the driver expects a command

0 commit comments

Comments
 (0)