Get dual build working
This commit is contained in:
parent
33714fcf17
commit
473efc8003
@ -12,8 +12,7 @@ pkgs.stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
cp -r .pio/build/* $out/
|
||||||
cp .pio/build/*/firmware.bin $out/bin/
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
__noChroot = true;
|
__noChroot = true;
|
||||||
|
@ -30,6 +30,11 @@
|
|||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
|
#define BUSY_PIN 26
|
||||||
|
#define RST_PIN 27
|
||||||
|
#define DC_PIN 15
|
||||||
|
#define CS_PIN 14
|
||||||
|
|
||||||
class EpdIf
|
class EpdIf
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -11,11 +11,11 @@
|
|||||||
[platformio]
|
[platformio]
|
||||||
lib_dir = lib
|
lib_dir = lib
|
||||||
|
|
||||||
; [env:tinypico-color]
|
[env:tinypico-color]
|
||||||
; platform = espressif32
|
platform = espressif32
|
||||||
; board = tinypico
|
board = tinypico
|
||||||
; framework = arduino
|
framework = arduino
|
||||||
; build_flags = -DEPD7IN3F
|
build_flags = -DEPD7IN3F
|
||||||
|
|
||||||
[env:tinypico-16gray]
|
[env:tinypico-16gray]
|
||||||
platform = espressif32
|
platform = espressif32
|
||||||
|
@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
#ifdef EPD7IN3F
|
#ifdef EPD7IN3F
|
||||||
|
|
||||||
#define BUSY_PIN 26
|
|
||||||
#define RST_PIN 27
|
|
||||||
#define DC_PIN 15
|
|
||||||
#define CS_PIN 14
|
|
||||||
|
|
||||||
#include "epd7in3f.h"
|
#include "epd7in3f.h"
|
||||||
|
|
||||||
const char *einkDisplayProperties = R"json(
|
const char *einkDisplayProperties = R"json(
|
||||||
@ -48,7 +43,8 @@ const char* einkDisplayProperties = R"json(
|
|||||||
|
|
||||||
Epd epd;
|
Epd epd;
|
||||||
|
|
||||||
void initDisplay() {
|
void initDisplay()
|
||||||
|
{
|
||||||
if (epd.Init() != 0)
|
if (epd.Init() != 0)
|
||||||
{
|
{
|
||||||
Serial.print("e-Paper init failed");
|
Serial.print("e-Paper init failed");
|
||||||
@ -56,7 +52,8 @@ void initDisplay() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawImage(uint8_t* image) {
|
void drawImage(uint8_t *image)
|
||||||
|
{
|
||||||
// Serial.print("Wake up display\n");
|
// Serial.print("Wake up display\n");
|
||||||
// epd.Reset();
|
// epd.Reset();
|
||||||
// Serial.print("Clear display\n");
|
// Serial.print("Clear display\n");
|
||||||
@ -156,11 +153,13 @@ const char* einkDisplayProperties = R"json(
|
|||||||
}
|
}
|
||||||
)json";
|
)json";
|
||||||
|
|
||||||
void initDisplay() {
|
void initDisplay()
|
||||||
|
{
|
||||||
IT8951_Init();
|
IT8951_Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
void drawImage(uint8_t* image) {
|
void drawImage(uint8_t *image)
|
||||||
|
{
|
||||||
gpFrameBuf = image;
|
gpFrameBuf = image;
|
||||||
Serial.println("Sending image");
|
Serial.println("Sending image");
|
||||||
IT8951_BMP_Example(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT);
|
IT8951_BMP_Example(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user