OLED: better device presence check
This commit is contained in:
parent
5fa6a58e9b
commit
72c3fc8677
|
@ -42,6 +42,9 @@
|
|||
|
||||
bool oled_ssd1306_setup(void)
|
||||
{
|
||||
if (!i2c_master_check_signals(OLED_SSD1306_I2C)) { // check if there are pull-ups to operator I2C
|
||||
return false;
|
||||
}
|
||||
i2c_master_setup(OLED_SSD1306_I2C, 400); // setup I2C bus ( SSD1306 supports an I2C cleck up to 400 kHz)
|
||||
const uint8_t oled_init[] = {
|
||||
0x00, // control byte: continuous (multiple byes), command
|
||||
|
|
Loading…
Reference in New Issue