fix build issues on GCC 12
This commit is contained in:
@@ -80,7 +80,7 @@ int16_t num[] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Quick helper function for single byte transfers */
|
/* Quick helper function for single byte transfers */
|
||||||
inline void i2c_write_byte(uint8_t val) {
|
void i2c_write_byte(uint8_t val) {
|
||||||
#ifdef i2c_default
|
#ifdef i2c_default
|
||||||
i2c_write_blocking(i2c_default, I2C_addr, &val, 1, false);
|
i2c_write_blocking(i2c_default, I2C_addr, &val, 1, false);
|
||||||
#endif
|
#endif
|
||||||
@@ -99,7 +99,9 @@ static inline void ht16k33_display_set(int position, uint16_t bin) {
|
|||||||
buf[0] = position * 2;
|
buf[0] = position * 2;
|
||||||
buf[1] = bin & 0xff;
|
buf[1] = bin & 0xff;
|
||||||
buf[2] = bin >> 8;
|
buf[2] = bin >> 8;
|
||||||
|
#ifdef i2c_default
|
||||||
i2c_write_blocking(i2c_default, I2C_addr, buf, count_of(buf), false);
|
i2c_write_blocking(i2c_default, I2C_addr, buf, count_of(buf), false);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ht16k33_display_char(int position, char ch) {
|
static inline void ht16k33_display_char(int position, char ch) {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ void calc_render_area_buflen(struct render_area *area) {
|
|||||||
|
|
||||||
#ifdef i2c_default
|
#ifdef i2c_default
|
||||||
|
|
||||||
inline void SSD1306_send_cmd(uint8_t cmd) {
|
void SSD1306_send_cmd(uint8_t cmd) {
|
||||||
// I2C write process expects a control byte followed by data
|
// I2C write process expects a control byte followed by data
|
||||||
// this "data" can be a command or data to follow up a command
|
// this "data" can be a command or data to follow up a command
|
||||||
// Co = 1, D/C = 0 => the driver expects a command
|
// Co = 1, D/C = 0 => the driver expects a command
|
||||||
|
|||||||
Reference in New Issue
Block a user