Skip to content

Commit

Permalink
Update LCD to use new SPI CS control
Browse files Browse the repository at this point in the history
  • Loading branch information
GregAC authored and HU90m committed Oct 16, 2024
1 parent eae8c99 commit 677a507
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion libraries/lcd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,15 @@ namespace sonata::lcd::internal
};
lcdIntf->gpio_write =
[](void *handle, bool csHigh, bool dcHigh) -> uint32_t {
set_gpio_output_bit(LcdCsPin, csHigh);
if (csHigh)
{
spi()->cs = 1;
}
else
{
spi()->cs = 0;
}

set_gpio_output_bit(LcdDcPin, dcHigh);
return 0;
};
Expand Down

0 comments on commit 677a507

Please sign in to comment.