-
-
Notifications
You must be signed in to change notification settings - Fork 200
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from lovyan03/unstable
v0.1.14
- Loading branch information
Showing
18 changed files
with
207 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#ifndef LOVYANGFX_CONFIG_HPP_ | ||
#define LOVYANGFX_CONFIG_HPP_ | ||
|
||
namespace lgfx | ||
{ | ||
struct LGFX_Config | ||
{ | ||
static constexpr spi_host_device_t spi_host = VSPI_HOST; | ||
static constexpr int dma_channel = 1; | ||
static constexpr int spi_mosi = 19; | ||
static constexpr int spi_miso = -1; | ||
static constexpr int spi_sclk = 18; | ||
}; | ||
} | ||
|
||
class LGFX : public lgfx::LGFX_SPI<lgfx::LGFX_Config> | ||
{ | ||
struct Panel_default : public lgfx::Panel_ST7735S | ||
{ | ||
Panel_default() { | ||
len_dummy_read_pixel = 17; | ||
spi_3wire = true; | ||
invert = true; | ||
spi_cs = 5; | ||
spi_dc = 23; | ||
gpio_rst = 26; | ||
gpio_bl = 27; | ||
pwm_ch_bl = 7; | ||
panel_width = 80; | ||
panel_height = 160; | ||
offset_x = 26; | ||
offset_y = 1; | ||
offset_rotation = 2; | ||
} | ||
/* | ||
protected: | ||
const std::uint8_t* getInitCommands(std::uint8_t listno) const override { | ||
static constexpr std::uint8_t list[] = { | ||
CMD::GAMMASET, 1, 0x08, // Gamma set, curve 4 | ||
0xFF,0xFF, // end | ||
}; | ||
if (listno == 2) return list; | ||
return Panel_ST7735S::getInitCommands(listno); | ||
} | ||
//*/ | ||
}; | ||
|
||
public: | ||
LGFX(void) : lgfx::LGFX_SPI<lgfx::LGFX_Config>() | ||
{ | ||
static Panel_default panel; | ||
|
||
setPanel(&panel); | ||
} | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.