fix build issues on GCC 12

This commit is contained in:
graham sanderson
2023-02-06 16:18:12 -06:00
parent 86496336c1
commit 9600dec1f0
2 changed files with 4 additions and 2 deletions

View File

@@ -80,7 +80,7 @@ int16_t num[] = {
}
/* 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
i2c_write_blocking(i2c_default, I2C_addr, &val, 1, false);
#endif
@@ -99,7 +99,9 @@ static inline void ht16k33_display_set(int position, uint16_t bin) {
buf[0] = position * 2;
buf[1] = bin & 0xff;
buf[2] = bin >> 8;
#ifdef i2c_default
i2c_write_blocking(i2c_default, I2C_addr, buf, count_of(buf), false);
#endif
}
static inline void ht16k33_display_char(int position, char ch) {

View File

@@ -101,7 +101,7 @@ void calc_render_area_buflen(struct render_area *area) {
#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
// this "data" can be a command or data to follow up a command
// Co = 1, D/C = 0 => the driver expects a command