File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class Tab5Display : public lgfx::LGFX_Device
103
103
}
104
104
105
105
106
- bool init (bool use_reset )
106
+ bool init ()
107
107
{
108
108
static constexpr int_fast16_t in_i2c_port = 1 ;// I2C_NUM_1;
109
109
@@ -114,15 +114,19 @@ class Tab5Display : public lgfx::LGFX_Device
114
114
std::uint32_t id = lgfx::i2c::readRegister8 (in_i2c_port, pi4io1_i2c_addr, 0x01 ).has_value ()
115
115
&& lgfx::i2c::readRegister8 (in_i2c_port, pi4io2_i2c_addr, 0x01 ).has_value ();
116
116
117
- if ( id == 0 ) return false ;
117
+ if ( id == 0 )
118
+ {
119
+ ESP_LOGE (" LGFX" , " M5Tab5 detection failed" );
120
+ return false ;
121
+ }
122
+
123
+ ESP_LOGI (" LGFX" , " M5Tab5 detected: 0x%x" , id);
118
124
119
125
i2c_write_register8_array (in_i2c_port, pi4io1_i2c_addr, reg_data_io1_1, 400000 );
120
126
i2c_write_register8_array (in_i2c_port, pi4io2_i2c_addr, reg_data_io2, 400000 );
121
127
i2c_write_register8_array (in_i2c_port, pi4io1_i2c_addr, reg_data_io1_2, 400000 );
122
128
123
- auto dev = (lgfx::Panel_Device*)this ;
124
-
125
- return dev->init (use_reset);
129
+ return lgfx::LGFX_Device::init ();
126
130
}
127
131
128
132
};
You can’t perform that action at this time.
0 commit comments