Skip to content

Commit

Permalink
improved PlatformIO compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fdivitto committed May 23, 2022
1 parent 07a125b commit 6a7d102
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
8 changes: 5 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "FabGL",
"keywords": "sprite, terminal, VT100, ANSI, keyboard, mouse, VGA, PAL, NTSC, Composite, SSD1306, ILI9341, ST7789, OLED, DS3231, I2S, I2C, game, engine, PS2, graphics, audio, sound, font, arduino, ESP32, display, vic20, emulator, 8086, z80, 6502",
"description": "ESP32 VGA Controller, Composite PAL/NTSC Controller, PS/2 Mouse and Keyboard Controller, Graphics Library, Sound Engine, Game Engine and ANSI/VT Terminal",
"homepage": "http://www.fabglib.org"
"repository":
{
"type": "git",
Expand All @@ -16,8 +17,9 @@
"maintainer": true
}
],
"version": "1.0.7",
"frameworks": "arduino",
"version": "1.0.8",
"frameworks": ["espidf", "arduino"],
"platforms": "espressif32",
"headers": "fabgl.h"
"headers": "fabgl.h",
"includeDir": "src"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=FabGL
version=1.0.7
version=1.0.8
author=Fabrizio Di Vittorio <[email protected]>
maintainer=Fabrizio Di Vittorio <[email protected]>
sentence=ESP32 VGA, PAL/NTSC Color Composite, SSD1306 ILI9341 ST7789 Controller, PS/2 Mouse and Keyboard Controller, Graphics Library, Graphical User Interface (GUI), Sound Engine, Game Engine and ANSI/VT Terminal
Expand Down
15 changes: 7 additions & 8 deletions src/fabutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,14 +1226,13 @@ bool FileBrowser::mountSDCard(bool formatOnFail, char const * mountPath, size_t
// @TODO: check again
host.max_freq_khz = 19000;

spi_bus_config_t bus_cfg = {
.mosi_io_num = int2gpio(MOSI),
.miso_io_num = int2gpio(MISO),
.sclk_io_num = int2gpio(CLK),
.quadwp_io_num = -1,
.quadhd_io_num = -1,
.max_transfer_sz = 4000,
};
spi_bus_config_t bus_cfg = { };
bus_cfg.mosi_io_num = int2gpio(MOSI);
bus_cfg.miso_io_num = int2gpio(MISO);
bus_cfg.sclk_io_num = int2gpio(CLK);
bus_cfg.quadwp_io_num = -1;
bus_cfg.quadhd_io_num = -1;
bus_cfg.max_transfer_sz = 4000;
auto r = spi_bus_initialize((spi_host_device_t)host.slot, &bus_cfg, 2);

if (r == ESP_OK || r == ESP_ERR_INVALID_STATE) { // ESP_ERR_INVALID_STATE, maybe spi_bus_initialize already called
Expand Down
2 changes: 0 additions & 2 deletions src/terminal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,6 @@ bool Terminal::flowControl()
// connect to UART2
void Terminal::connectSerialPort(uint32_t baud, int dataLength, char parity, float stopBits, int rxPin, int txPin, FlowControl flowControl, bool inverted, int rtsPin, int ctsPin)
{
auto uart = (volatile uart_dev_t *) DR_REG_UART2_BASE;

bool initialSetup = !m_uart;

if (initialSetup) {
Expand Down

0 comments on commit 6a7d102

Please sign in to comment.