-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow Ili9341 variables at the module scope
These statements no longer cause an error at the module scope: let tft = initIli9321(9, 10) Introduces a C++ subclass with a default constructor. Workaround for nim-lang/Nim#14389
- Loading branch information
1 parent
a7f770d
commit 06bffcc
Showing
3 changed files
with
15 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#include <Adafruit_ILI9341.h> | ||
|
||
// Adds a default constructor to Adafruit_ILI9341, to work around this issue: | ||
// https://github.com/nim-lang/Nim/issues/14389 | ||
|
||
class Adafruit_ILI9341_Workaround : public Adafruit_ILI9341 { | ||
public: | ||
Adafruit_ILI9341_Workaround(int8_t _CS, int8_t _DC): Adafruit_ILI9341(_CS, _DC) {} | ||
Adafruit_ILI9341_Workaround(): Adafruit_ILI9341(-1, -1) {} | ||
}; |