Skip to content

Commit 56b4522

Browse files
authored
Remove bitwise operation on address (#355)
1 parent 8bfcdbd commit 56b4522

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

i2c/ssd1306_i2c/ssd1306_i2c.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void SSD1306_send_cmd(uint8_t cmd) {
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
108108
uint8_t buf[2] = {0x80, cmd};
109-
i2c_write_blocking(i2c_default, (SSD1306_I2C_ADDR & SSD1306_WRITE_MODE), buf, 2, false);
109+
i2c_write_blocking(i2c_default, SSD1306_I2C_ADDR, buf, 2, false);
110110
}
111111

112112
void SSD1306_send_cmd_list(uint8_t *buf, int num) {
@@ -127,7 +127,7 @@ void SSD1306_send_buf(uint8_t buf[], int buflen) {
127127
temp_buf[0] = 0x40;
128128
memcpy(temp_buf+1, buf, buflen);
129129

130-
i2c_write_blocking(i2c_default, (SSD1306_I2C_ADDR & SSD1306_WRITE_MODE), temp_buf, buflen + 1, false);
130+
i2c_write_blocking(i2c_default, SSD1306_I2C_ADDR, temp_buf, buflen + 1, false);
131131

132132
free(temp_buf);
133133
}

0 commit comments

Comments
 (0)