MCPcopy Create free account
hub / github.com/Duet3D/RepRapFirmware / Init

Method Init

src/Display/Lcd/TFTLcd.cpp:37–45  ·  view source on GitHub ↗

Initialize the display

Source from the content-addressed store, hash-verified

35
36// Initialize the display
37void TFTLcd::Init(Pin p_csPin, Pin p_a0Pin, bool csPolarity, uint32_t freq, uint8_t p_contrastRatio, uint8_t p_resistorRatio) noexcept
38{
39 csPin = p_csPin;
40 csPol = csPolarity;
41 spiFrequency = freq;
42 spiDev.SetClockFrequencyAndMode(freq, spiMode, true); // note we currently always use 9-bit SPI
43 SetPinMode(csPin, (csPolarity) ? OUTPUT_LOW : OUTPUT_HIGH);
44 HardwareInit();
45}
46
47#endif
48

Callers 1

THROWSFunction · 0.45

Calls 1

Tested by

no test coverage detected