Merge pull request #439 from Zaltora/ssd1306_fix
Fix SPI3 protocol with SSD1306
This commit is contained in:
commit
42ccb47eb3
1 changed files with 13 additions and 3 deletions
|
@ -293,9 +293,19 @@ int ssd1306_load_frame_buffer(const ssd1306_t *dev, uint8_t buf[])
|
|||
{
|
||||
spi_set_command(SPI_BUS,1,1); // data mode
|
||||
if (buf)
|
||||
spi_transfer(SPI_BUS, buf, NULL, len, SPI_8BIT);
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
spi_transfer(SPI_BUS, &buf[i], NULL, 1, SPI_8BIT);
|
||||
}
|
||||
}
|
||||
else
|
||||
spi_repeat_send_8(SPI_BUS,0,len);
|
||||
{
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
spi_transfer_8(SPI_BUS, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue