Skip to content

Commit 38eee97

Browse files
committed
Start work on porting inkplate 5v2 and 6
With small fixes to Inkplate 10 port
1 parent d695477 commit 38eee97

File tree

20 files changed

+2673
-13
lines changed

20 files changed

+2673
-13
lines changed

src/boardSelect.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@
1010
* @authors Borna Biro for soldered.com
1111
***************************************************/
1212

13-
#ifndef __MY_TEST_LIBRARY_BOARD_SELECT_H__
14-
#define __MY_TEST_LIBRARY_BOARD_SELECT_H__
13+
#ifndef __BOARD_SELECT_H__
14+
#define __BOARD_SELECT_H__
1515

1616
#include <Arduino.h>
1717

1818
#ifdef ARDUINO_INKPLATE10V2
1919
#include "boards/Inkplate10/Inkplate10BoardFile.h"
20+
#elif defined(ARDUINO_INKPLATE6V2)
21+
#include "boards/Inkplate6/Inkplate6BoardFile.h"
22+
#elif defined(ARDUINO_INKPLATE5V2)
23+
#include "boards/Inkplate5V2/Inkplate5V2BoardFile.h"
2024
#else
2125
#error "Board not selected!"
2226
#endif

src/boards/Inkplate10/Inkplate10Driver.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "Inkplate10Driver.h"
22
#include "Inkplate.h"
33

4+
// Header guard for the Arduino include
5+
#ifdef ARDUINO_INKPLATE10V2
46

57
SPIClass spi2(2);
68
SdFat sd(&spi2);
@@ -756,6 +758,8 @@ void EPDDriver::gpioInit()
756758
internalIO.pinMode(GPIO0_ENABLE, OUTPUT);
757759
internalIO.digitalWrite(GPIO0_ENABLE, 1);
758760

761+
pmicBegin();
762+
759763
// For same reason, unused pins of first I/O expander have to be also set as
760764
// outputs, low.
761765
internalIO.pinMode(14, OUTPUT);
@@ -841,6 +845,8 @@ uint8_t EPDDriver::initializeFramebuffers()
841845
memset(_partial, 0, E_INK_WIDTH * E_INK_HEIGHT / 8);
842846
memset(_pBuffer, 0, E_INK_WIDTH * E_INK_HEIGHT / 4);
843847
memset(DMemory4Bit, 255, E_INK_WIDTH * E_INK_HEIGHT / 2);
848+
849+
return 1;
844850
}
845851

846852
/**
@@ -996,3 +1002,5 @@ int8_t EPDDriver::readTemperature()
9961002
}
9971003
return temp;
9981004
}
1005+
1006+
#endif

src/boards/Inkplate10/pins.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#define __INKPLATE10V2_PINS_H__
33
#include "soc/gpio_reg.h"
44
#include "soc/gpio_struct.h"
5+
// Header guard for the Arduino include
6+
#ifdef ARDUINO_INKPLATE10V2
57
#define IO_INT_ADDR 0x20
68
#define IO_EXT_ADDR 0x21
79

@@ -99,4 +101,5 @@
99101
GPIO.out_w1tc = LE; \
100102
}
101103

104+
#endif
102105
#endif
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
**************************************************
3+
*
4+
* @file Inkplate10BoardFile.h
5+
* @brief Wrrapper for the different Inkplate boards and
6+
* it's classes.
7+
*
8+
*
9+
* @copyright GNU General Public License v3.0
10+
* @authors Borna Biro for soldered.com
11+
***************************************************/
12+
13+
// Header guard.
14+
#ifndef __INKPLATE5V2_BOARD_SELECT_H__
15+
#define __INKPLATE5V2_BOARD_SELECT_H__
16+
17+
// Board select check.
18+
#ifdef ARDUINO_INKPLATE5V2
19+
20+
// Include Inkplate10 board header file.
21+
#include "Inkplate5V2Driver.h"
22+
23+
// Wrapper for different Inkplate boards.
24+
class InkplateBoardClass : public EPDDriver
25+
{
26+
public:
27+
InkplateBoardClass(){};
28+
};
29+
30+
#endif
31+
#endif

0 commit comments

Comments
 (0)