ghi-electronics / TinyCLR-Drivers

Drivers for sensors/devices to be used with TinyCLR OS
Apache License 2.0
6 stars 9 forks source link

HiLetgo.ILI9341 Driver Throwing Error #125

Closed kirklynk closed 3 years ago

kirklynk commented 3 years ago

Currently, the GHIElectronics.TinyCLR.Drivers.HiLetgo.ILI9341 driver is throwing a "Null Reference" exception whenever the Reset method is called. This is due to the fact that the reset pin could be null.

The fix, add nullable check on reset pin references in reset method: this.reset?.Write(GpioPinValue.Low); Thread.Sleep(50);

this.reset?.Write(GpioPinValue.High); Thread.Sleep(200);

Palomino34 commented 3 years ago

Fixed. Thanks