-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathobd.inl
4409 lines (4235 loc) · 149 KB
/
obd.inl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//
// OneBitDisplay (OLED/LCD/E-Paper library)
// Copyright (c) 2020 BitBank Software, Inc.
// Written by Larry Bank ([email protected])
// Project started 3/23/2020
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// obd.inl
// display interfacing/control code for OneBitDisplay library
//
#if defined(_LINUX_) || defined(ARDUINO_ARCH_MCS51)
#define memcpy_P memcpy
#endif
void initSPI(OBDISP *pOBD, int iSpeed, int iMOSI, int iCLK, int iCS);
void _delay(int iDelay);
static void EPDWaitBusy(OBDISP *pOBD, int bQuick);
static void EPDSleep(OBDISP *pOBD, int bDeep);
#ifndef WIMPY_MCU
static void EPDWriteImage4bpp(OBDISP *pOBD, uint8_t ucCMD, int x, int y, int w, int h);
static void EPDWriteImage2bpp(OBDISP *pOBD, uint8_t ucCMD, int x, int y, int w, int h);
static void EPDWriteImage(OBDISP *pOBD, uint8_t ucCMD, uint8_t *pBits, int x, int y, int w, int h, int bInvert);
#endif
void EPD213_Begin(OBDISP *pOBD, int x, int y, int w, int h, int bPartial);
void EPD_CMD2(OBDISP *pOBD, uint8_t cmd, uint8_t param);
void obdSetDCMode(OBDISP *pOBD, int iMode);
void InvertBytes(uint8_t *pData, uint8_t bLen);
void SPI_BitBang(OBDISP *pOBD, uint8_t *pData, int iLen, uint8_t iMOSIPin, uint8_t iSCKPin);
static void RawWrite(OBDISP *pOBD, unsigned char *pData, int iLen);
void RawWriteData(OBDISP *pOBD, unsigned char *pData, int iLen);
// EPD look up tables
// 2.7" 176x264 LUTs
const uint8_t lut_fast_vcom_dc[] PROGMEM = {
0x00, 0x00,
0x00, 0x1A, 0x1A, 0x00, 0x00, 0x01,
0x00, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x0E, 0x01, 0x0E, 0x01, 0x01,
0x00, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x04, 0x10, 0x00, 0x00, 0x05,
0x00, 0x03, 0x0E, 0x00, 0x00, 0x0A,
0x00, 0x23, 0x00, 0x00, 0x00, 0x01
};
const uint8_t lut_fast_ww[] PROGMEM = {
0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01,
0x40, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x84, 0x0E, 0x01, 0x0E, 0x01, 0x01,
0x80, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x04, 0x10, 0x00, 0x00, 0x05,
0x00, 0x03, 0x0E, 0x00, 0x00, 0x0A,
0x00, 0x23, 0x00, 0x00, 0x00, 0x01
};
const uint8_t lut_fast_bw[] PROGMEM = {
0xA0, 0x1A, 0x1A, 0x00, 0x00, 0x01,
0x00, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x84, 0x0E, 0x01, 0x0E, 0x01, 0x01,
0x90, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0xB0, 0x04, 0x10, 0x00, 0x00, 0x05,
0xB0, 0x03, 0x0E, 0x00, 0x00, 0x0A,
0xC0, 0x23, 0x00, 0x00, 0x00, 0x01
};
const uint8_t lut_fast_bb[] PROGMEM = {
0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01,
0x40, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x84, 0x0E, 0x01, 0x0E, 0x01, 0x01,
0x80, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x04, 0x10, 0x00, 0x00, 0x05,
0x00, 0x03, 0x0E, 0x00, 0x00, 0x0A,
0x00, 0x23, 0x00, 0x00, 0x00, 0x01
};
const uint8_t lut_fast_wb[] PROGMEM = {
0x90, 0x1A, 0x1A, 0x00, 0x00, 0x01,
0x20, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x84, 0x0E, 0x01, 0x0E, 0x01, 0x01,
0x10, 0x0A, 0x0A, 0x00, 0x00, 0x01,
0x00, 0x04, 0x10, 0x00, 0x00, 0x05,
0x00, 0x03, 0x0E, 0x00, 0x00, 0x0A,
0x00, 0x23, 0x00, 0x00, 0x00, 0x01
};
const uint8_t lut_vcom_dc[] PROGMEM =
{
0x00, 0x00,
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x32, 0x32, 0x00, 0x00, 0x02,
0x00, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
const uint8_t lut_ww[] PROGMEM =
{
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t lut_bw[] PROGMEM =
{
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t lut_bb[] PROGMEM =
{
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const uint8_t lut_wb[] PROGMEM =
{
0xA0, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x60, 0x32, 0x32, 0x00, 0x00, 0x02,
0x50, 0x0F, 0x0F, 0x00, 0x00, 0x05,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char lut_vcom0_full[] PROGMEM =
{
0x40, 0x17, 0x00, 0x00, 0x00, 0x02,
0x00, 0x17, 0x17, 0x00, 0x00, 0x02,
0x00, 0x0A, 0x01, 0x00, 0x00, 0x01,
0x00, 0x0E, 0x0E, 0x00, 0x00, 0x02,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
const unsigned char lut42_4gray_vcom[] PROGMEM = {
0x00 ,0x0A ,0x00 ,0x00 ,0x00 ,0x01,
0x60 ,0x14 ,0x14 ,0x00 ,0x00 ,0x01,
0x00 ,0x14 ,0x00 ,0x00 ,0x00 ,0x01,
0x00 ,0x13 ,0x0A ,0x01 ,0x00 ,0x01,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
const unsigned char lut42_4gray_ww[] PROGMEM = {
0x40 ,0x0A ,0x00 ,0x00 ,0x00 ,0x01,
0x90 ,0x14 ,0x14 ,0x00 ,0x00 ,0x01,
0x10 ,0x14 ,0x0A ,0x00 ,0x00 ,0x01,
0xA0 ,0x13 ,0x01 ,0x00 ,0x00 ,0x01,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
const unsigned char lut42_4gray_bw[] PROGMEM = {
0x40 ,0x0A ,0x00 ,0x00 ,0x00 ,0x01,
0x90 ,0x14 ,0x14 ,0x00 ,0x00 ,0x01,
0x00 ,0x14 ,0x0A ,0x00 ,0x00 ,0x01,
0x99 ,0x0C ,0x01 ,0x03 ,0x04 ,0x01,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
const unsigned char lut42_4gray_bb[] PROGMEM = {
0x80 ,0x0A ,0x00 ,0x00 ,0x00 ,0x01,
0x90 ,0x14 ,0x14 ,0x00 ,0x00 ,0x01,
0x20 ,0x14 ,0x0A ,0x00 ,0x00 ,0x01,
0x50 ,0x13 ,0x01 ,0x00 ,0x00 ,0x01,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
const unsigned char lut42_4gray_wb[] PROGMEM = {
0x40 ,0x0A ,0x00 ,0x00 ,0x00 ,0x01,
0x90 ,0x14 ,0x14 ,0x00 ,0x00 ,0x01,
0x00 ,0x14 ,0x0A ,0x00 ,0x00 ,0x01,
0x99 ,0x0B ,0x04 ,0x04 ,0x01 ,0x01,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00
};
#ifndef WIMPY_MCU
const uint8_t epd29b_bwyr_init_sequence_full[] PROGMEM = {
0x02, 0x4d, 0x78,
0x03, 0x00, 0x0f, 0x29, // PSR
0x03, 0x01, 0x07, 0x00, // PWRR
0x04, 0x03, 0x10, 0x54, 0x44, // POFS
0x08, 0x06, 0x05, 0x00, 0x3f, 0x0a, 0x25, 0x12, 0x1a, // BTST_P
0x02, 0x50, 0x37, // CDI
0x03, 0x60, 0x02, 0x02, // TCON
0x05, 0x61, 0x00, 128, 0x01, 296-256, // TRES
0x02, 0xe7, 0x1c,
0x02, 0xe3, 0x22,
0x04, 0xb4, 0xd0, 0xb5, 0x03,
0x02, 0xe9, 0x01,
0x02, 0x30, 0x08,
0x01, 0x04, // PON
BUSY_WAIT,
0x00
};
const uint8_t epd29_bwyr_init_sequence_full[] PROGMEM = {
0x02, 0x4d, 0x78,
0x03, 0x00, 0x0f, 0x29, // PSR
0x03, 0x01, 0x07, 0x00, // PWRR
0x04, 0x03, 0x10, 0x54, 0x44, // POFS
0x08, 0x06, 0x05, 0x00, 0x3f, 0x0a, 0x25, 0x12, 0x1a, // BTST_P
0x02, 0x50, 0x37, // CDI
0x03, 0x60, 0x02, 0x02, // TCON
0x05, 0x61, 0x00, 168, 0x01, 384-256, // TRES
0x02, 0xe7, 0x1c,
0x02, 0xe3, 0x22,
0x04, 0xb4, 0xd0, 0xb5, 0x03,
0x02, 0xe9, 0x01,
0x02, 0x30, 0x08,
0x01, 0x04, // PON
BUSY_WAIT,
0x00
};
const uint8_t epd266_bwyr_init_sequence_full[] PROGMEM = {
0x02, 0x4d, 0x78,
0x03, 0x00, 0x0f, 0x29, // PSR
0x03, 0x01, 0x07, 0x00, // PWRR
0x04, 0x03, 0x10, 0x54, 0x44, // POFS
0x08, 0x06, 0x05, 0x00, 0x3f, 0x0a, 0x25, 0x12, 0x1a, // BTST_P
0x02, 0x50, 0x37, // CDI
0x03, 0x60, 0x02, 0x02, // TCON
0x05, 0x61, 0x00, 184, 0x01, 360-256, // TRES
0x02, 0xe7, 0x1c,
0x02, 0xe3, 0x22,
0x04, 0xb4, 0xd0, 0xb5, 0x03,
0x02, 0xe9, 0x01,
0x02, 0x30, 0x08,
0x01, 0x04, // PON
BUSY_WAIT,
0x00
};
const uint8_t epd236_bwyr_init_sequence_full[] PROGMEM = {
0x05, 0x66, 0x49, 0x55, 0x13, 0x5d,
0x03, 0x66, 0x49, 0x55,
0x02, 0xb0, 0x03, // boost
0x03, 0x00, 0x4f, 0x6b,
0x02, 0x03, 0x00,
0x06, 0xf0, 0xf6, 0x0d, 0x00, 0x00, 0x00,
0x04, 0x06, 0xcf, 0xdf, 0x0f,
0x02, 0x41, 0x00,
0x02, 0x50, 0x30,
0x03, 0x60, 0x0c, 0x05,
0x04, 0x61, 0xa8, 0x01, 0x28, // resolution
0x02, 0x84, 0x01,
0x00
};
const uint8_t epd164_bwyr_init_sequence_full[] PROGMEM = {
0x05, 0x66, 0x49, 0x55, 0x13, 0x5d,
0x03, 0x66, 0x49, 0x55,
0x02, 0xb0, 0x03, // boost
0x03, 0x00, 0x4f, 0x6b,
0x02, 0x03, 0x00,
0x06, 0xf0, 0xf6, 0x0d, 0x00, 0x00, 0x00,
0x04, 0x06, 0xcf, 0xdf, 0x0f,
0x02, 0x41, 0x00,
0x02, 0x50, 0x30,
0x03, 0x60, 0x0c, 0x05,
0x04, 0x61, 0xa8, 0x00, 0xa8, // resolution
0x02, 0x84, 0x01,
0x00
};
const uint8_t epd30_bwyr_init_sequence_full[] PROGMEM = {
0x07, 0x66, 0x49, 0x55, 0x13, 0x5d, 0x05, 0x10,
0x02, 0xb0, 0x00, // boost
0x03, 0x01, 0x0f, 0x00,
0x03, 0x00, 0x4f, 0x6b,
0x04, 0x06, 0xd7, 0xde, 0x12,
0x05, 0x61, 0x00, 0xa8, 0x01, 0x90, // resolution
0x02, 0x50, 0x37,
0x03, 0x60, 0x0c, 0x05,
0x02, 0xe3, 0xff,
0x02, 0x84, 0x00,
0x00
};
const uint8_t epd583r_init_sequence_full[] PROGMEM = {
0x03, 0x01, 0x37, 0x00, // power setting
0x03, 0x00, 0xcf, 0x08, // panel setting
0x04, 0x06, 0xc7, 0xcc, 0x28, // boost
0x02, 0x30, 0x3a, // PLL 15s refresh
0x02, 0x41, 0x00, // temperature
0x02, 0x50, 0x77, // VCOM
0x02, 0x60, 0x22, // TCON
0x05, 0x61, 0x02, 0x58, 0x01, 0xc0, // RES
0x02, 0x82, 0x28, // temp range
0x02, 0xe5, 0x03, // flash mode
0x01, 0x04, // power on
BUSY_WAIT,
0x00
};
const uint8_t epd74r_init_sequence_full[] PROGMEM = {
0x02, 0x65, 0x01,
0x01, 0xab,
0x02, 0x65, 0x00,
0x01, 0x04,
BUSY_WAIT,
0x03, 0x01, 0x37, 0x00, // 0x05, 0x05,
0x03, 0x00, 0xcf, 0x08,
// 0x02, 0xe5, 0x03,
// 0x02, 0x03, 0x00,
0x04, 0x06, 0xc7, 0xcc, 0x28,
0x02, 0x30, 0x3c,
0x02, 0x41, 0x00,
0x02, 0x50, 0x77,
0x02, 0x60, 0x22,
0x05, 0x61, 0x02, 0x80, 0x01, 0x80,
// 0x02, 0x65, 0x01,
// 0x02, 0x65, 0x00,
// 0x01, 0x40,
// BUSY_WAIT,
// 0x02, 0x8d, 0x80,
0x02, 0x82, 0x1e,
0x02, 0xe5, 0x03,
// 0x01, 0x02,
// BUSY_WAIT,
0x01, 0x04,
BUSY_WAIT,
// 0x02, 0x65, 0x01,
// 0x02, 0x65, 0x00,
// 0x01, 0x40,
// BUSY_WAIT,
// 0x02, 0x8d, 0xc0,
// 0x02, 0x30, 0x2a,
0x00
};
#endif // !WIMPY_MCU
const uint8_t epd35r_init_sequence_full[] PROGMEM = {
0x01, 0x12, // SW RESET
BUSY_WAIT,
0x02, 0x3c, 0x05,
0x02, 0x18, 0x80,
0x02, 0x22, 0xb1,
0x01, 0x20,
BUSY_WAIT,
0x03, 0x1b, 0x17, 0x80, // reading temp, delay 5ms
BUSY_WAIT,
0x02, 0x4e, 0x00, // ram counter start
0x03, 0x4f, 0x7f, 0x01,
0x00
};
// init sequence for GDEW042Z15
const uint8_t epd42r2_init_sequence_full[] PROGMEM = {
0x03, UC8151_PSR, 0xcf, 0x8d,
0x06, UC8151_PWR, 0x03, 0x10, 0x3f, 0x3f, 0x0d,
0x01, UC8151_PON, // power on
BUSY_WAIT,
0x05, UC8151_TRES, 0x01, 0x90, 1, 0x2c, // resolution
0x04, UC8151_BTST, 0x17,0x17,0x17, // booster soft-start config - START_10MS | STRENGTH_3 | OFF_6_58US
// 0x02, 0x00, 0x0f, // LUT from OTP
0x02, UC8151_CDI, 0x5c, // inverted, white border
0x00
};
// init sequence for 2.13" Random screen double connector
const uint8_t EPD213R_104x212_d_init_sequence_full[] PROGMEM = {
0x04, UC8151_BTST, 0x17,0x17,0x17, // booster soft-start config - START_10MS | STRENGTH_3 | OFF_6_58US
0x01, UC8151_PON, // power on
BUSY_WAIT,
0x02, 0x00, 0x0f, // LUT from OTP
0x02, UC8151_CDI, 0x5c, // inverted, white border
0x00
};
const uint8_t epd37_init_sequence_full[] PROGMEM = {
0x01, UC8151_PON, // Power on
BUSY_WAIT,
0x02, 0x00, 0x1f, // flip x
0x02, 0x50, 0x97, // VCOM
0x00
};
const uint8_t epd37_init_sequence_part[] PROGMEM = {
0x01, UC8151_PON, // Power on
BUSY_WAIT,
0x02, 0x00, 0x1f, // flip x
0x02, 0xe0, 0x02,
0x02, 0xe5, 0x6e,
0x02, 0x50, 0xd7, // VCOM
0x00
};
// initialization sequence for 3.7" 240x416 e-paper
const uint8_t epd37xx_init_sequence_full[] PROGMEM = {
0x03, UC8151_PSR, 0xdf, 0x8d,
0x06, UC8151_PWR, 0x03, 0x10, 0x3f, 0x3f, 0x0d,
0x01, UC8151_PON, // power on
BUSY_WAIT,
0x04, UC8151_TRES, 0xf0, 1, 0xa0, // resolution
0x04, UC8151_BTST, 0x17,0x17,0x17, // booster soft-start config - START_10MS | STRENGTH_3 | OFF_6_58US
0x02, UC8151_PFS, 0x00, // FRAMES_1
0x02, UC8151_TSE, 0x00, // TEMP_INTERNAL | OFFSET_0
0x02, UC8151_TCON, 0x22,
0x02, UC8151_CDI, 0xd7, // inverted, white border
0x02, UC8151_PLL, 0x09, // HZ_50
0x00 // end of table
};
// initialization sequence for 2.9" 296x128 e-paper
const uint8_t epd29_init_sequence_full[] PROGMEM = {
0x02, UC8151_PSR, 0x80 | 0x00 | 0x10 | 0x08 | 0x04 | 0x02 | 0x01, // RES_128x296, LUT_OTP, FORMAT_BW, SHIFT_LEFT, BOOSTER_ON, RESET_NONE
0x06, UC8151_PWR, 0x03, 0x00, 0x2b, 0x2b, 0x2b,
0x01, UC8151_PON, // power on
BUSY_WAIT,
0x04, UC8151_BTST, 0x17,0x17,0x17, // booster soft-start config - START_10MS | STRENGTH_3 | OFF_6_58US
0x02, UC8151_PFS, 0x00, // FRAMES_1
0x04, UC8151_TRES, 0x80, 1, 0x28, // resolution
0x02, UC8151_TSE, 0x00, // TEMP_INTERNAL | OFFSET_0
0x02, UC8151_TCON, 0x22,
0x02, UC8151_CDI, 0x9c, // inverted, white border
0x02, UC8151_PLL, 0x3a, // HZ_100
0x00 // end of table
};
const uint8_t epd42r_init_sequence[] PROGMEM = {
0x01, 0x12, // soft reset
BUSY_WAIT,
0x02, 0x74, 0x54, // set analog block control
0x02, 0x7e, 0x3b, // set digital block control
0x03, 0x2b, 0x04, 0x63, // ACVCOM
0x05, 0x0c, 0x8f, 0x8f, 0x8f, 0x3f, // Softstart
0x04, 0x01, 0x2b, 0x01, 0x00, // output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x31, // RAM X start/end
0x05, 0x45, 0,0,0x2b, 0x01, // RAM Y start/end
0x02, 0x3c, 0x01, // border (0=bk,1=wh,2=red)
0x02, 0x18, 0x80, // temp sensor = internal
0x02, 0x21, 0x00, // display update ctrl 1
0x02, 0x22, 0xb1, // display update ctrl 2
0x01, 0x20, // master activation
BUSY_WAIT,
0x02, 0x4e, 0x00, // RAM X counter
0x03, 0x4f, 0x2b, 0x01, // RAM Y counter
0x00
};
const uint8_t epd29r_init_sequence[] PROGMEM = {
0x01, 0x12, // soft reset
BUSY_WAIT,
0x02, 0x74, 0x54, // set analog block control
0x02, 0x7e, 0x3b, // set digital block control
0x03, 0x2b, 0x04, 0x63, // ACVCOM
0x05, 0x0c, 0x8f, 0x8f, 0x8f, 0x3f, // Softstart
0x04, 0x01, 0x27, 0x01, 0x00, // output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x0f, // RAM X start/end
0x05, 0x45, 0,0,0x27, 0x01, // RAM Y start/end
0x02, 0x3c, 0x01, // border (0=bk,1=wh,2=red)
0x02, 0x18, 0x80, // temp sensor = internal
0x02, 0x21, 0x00, // display update ctrl 1
0x02, 0x22, 0xb1, // display update ctrl 2
0x01, 0x20, // master activation
BUSY_WAIT,
0x02, 0x4e, 0x00, // RAM X counter
0x03, 0x4f, 0x27, 0x01, // RAM Y counter
0x00
};
// for 152x152 BWR
const uint8_t epd29r_init_sequence_152[] PROGMEM = {
0x01, 0x12, // soft reset
BUSY_WAIT,
0x02, 0x74, 0x54, // set analog block control
0x02, 0x7e, 0x3b, // set digital block control
0x03, 0x2b, 0x04, 0x63, // ACVCOM
0x05, 0x0c, 0x8f, 0x8f, 0x8f, 0x3f, // Softstart
0x04, 0x01, 0x97, 0x00, 0x00, // output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x12, // RAM X start/end
0x05, 0x45, 0,0,0x97, 0x00, // RAM Y start/end
0x02, 0x3c, 0x01, // border (0=bk,1=wh,2=red)
0x02, 0x18, 0x80, // temp sensor = internal
0x02, 0x21, 0x00, // display update ctrl 1
0x02, 0x22, 0xb1, // display update ctrl 2
0x01, 0x20, // master activation
BUSY_WAIT,
0x02, 0x4e, 0x00, // RAM X counter
0x03, 0x4f, 0x97, 0x00, // RAM Y counter
0x00
};
const uint8_t epd75_init_sequence_partial[] PROGMEM = {
0x06, UC8151_PWR, 0x17, 0x17, 0x3f, 0x3f, 0x11,
0x02, 0x82, 0x26, // VCOM DC
// 0x05, UC8151_BTST, 0x27,0x27,0x2f,0x17,
// 0x02, 0x30, 0x06, // oscillator
0x01, UC8151_PON, // power on
BUSY_WAIT,
0x02, UC8151_PSR, 0x3f, // from register
// 0x05, 0x61, 0x03, 0x20, 0x01, 0xe0, // resolution
// 0x02, 0x15, 0x00, // SPI mode
0x03, 0x50, 0x39, 0x07, // VCOM Data interval
// 0x02, 0x60, 0x22, // TCON
// 0x05, 0x65, 0x00, 0x00, 0x00, 0x00, // resolution
//#ifdef FUTURE
// 0x02, UC8151_PLL, 0x3a, // HZ_100
// 0x02, UC8151_VDCS, 0x12, // VCOM DC setting
// 0x02, UC8151_CDI, 0x97,
0x2d, UC8151_LUT_VCOM, // VCOM LUT
0x00, 30, 5, 30, 5, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
,0x00, 0x00,
0x2b, UC8151_LUT_WW, // WW LUT
0x00, 30, 5, 30, 5, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, UC8151_LUT_BW,
0x5a, 30, 5, 30, 5, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, UC8151_LUT_WB,
0x84, 30, 5, 30, 5, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, UC8151_LUT_BB,
0x00, 30, 5, 30, 5, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x2b, UC8151_LUT_VCOM2,
0x00, 30, 5, 30, 5, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
//#endif // FUTURE
0x00 // end of table
};
// 1.54" 152x152
const uint8_t epd154a_init_sequence_full[] PROGMEM =
{
1, UC8151_PON,
BUSY_WAIT,
2, UC8151_PSR, 0xdf, // panel setting
4, UC8151_TRES, 0x98, 0, 0x98, // resolution
2, UC8151_CDI, 0x97, // VCOM
0
};
const uint8_t epd154a_init_sequence_part[] PROGMEM =
{
1, UC8151_PON,
BUSY_WAIT,
2, UC8151_PSR, 0x3f, // panel setting
6, UC8151_PWR, 0x03, 0x00, 0x21, 0x21, 0x03,
4, UC8151_TRES, 0x98, 0, 0x98, // resolution
2, UC8151_VDCS, 0x12,
2, UC8151_CDI, 0x17, // VCOM
37, 0x20, 0x00, 10, 0, 60, 10, 1, // VCOM LUT
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
37, 0x21, 0x00, 10, 0, 60, 10, 1,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
37, 0x22, 0x5a, 10, 0, 60, 10, 1,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
37, 0x23, 0x84, 10, 0, 60, 10, 1,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
37, 0x24, 0x00, 10, 0, 60, 10, 1,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0
};
// 1.54" 200x200
const uint8_t epd154_init_sequence_full[] PROGMEM =
{
0x01, 0x12, // sw reset
BUSY_WAIT,
0x04, 0x01, 199, 0x00, 0x00, // driver output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x18,
0x05, 0x45, 0x00, 0x00, 0xc7, 0x00,
0x02, 0x3c, 0x05, // border waveform
0x02, 0x18, 0x80, // read temp sensor
// 0x03, 0x21, 0x00, 0x80, // display update control
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd154_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03,
0x03, 0x44, 0x00, 0x18,
0x05, 0x45, 0x00, 0x00, 199, 0x00,
0x02, 0x3c, 0x80, // border waveform
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
0
};
// partial (no flash) updates
const uint8_t epd154b_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03,
0x02, 0x3c, 0x80, // border waveform
0x03, 0x44, 0x00, 0x18,
0x05, 0x45, 0x00, 0x00, 199, 0x00,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
154, 0x32, // LUT
0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x80,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x40,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0xF,0x0,0x0,0x0,0x0,0x0,0x0,
0x1,0x1,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x0,0x0,0x0,0x0,0x0,0x0,0x0,
0x22,0x22,0x22,0x22,0x22,0x22,0x0,0x0,0x0,
2, 0x3f, 0x2, // ??
2, 0x03, 0x17, // gate voltage
4, 0x04, 0x41, 0xb0, 0x32, // source voltage
2, 0x2c, 0x28, // VCOM
11, 0x37, 0,0,0,0,0,0x40,0,0,0,0, // ??
2, 0x3c, 0x80, // VCOM ??
0x00 // end of table
};
const uint8_t epd213b_init_sequence_full[] PROGMEM =
{
0x01, 0x12, // sw reset
BUSY_WAIT,
0x04, 0x01, 0xf9, 0x00, 0x00,
0x02, 0x11, 0x03,
0x03, 0x44, 0x00, 0x0f,
0x05, 0x45, 0x00, 0x00, 0xf9, 0x00,
0x02, 0x3c, 0x05, // border waveform
0x03, 0x21, 0x00, 0x80, // display update control
0x02, 0x18, 0x80,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd213b_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03, // data direction
0x03, 0x44, 0x00, 0x0f, // x start/end
0x05, 0x45, 0x00, 0x00, 0xf9, 0x00, // y start/end
0x02, 0x3c, 0x80, // border waveform
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
0x00 // end of table
};
const uint8_t epd294_init_sequence_full[] PROGMEM =
{
// 0x02, 0x74, 0x54,
// 0x02, 0x7e, 0x3b,
// 0x03, 0x2b, 0x04, 0x63,
// 0x05, 0x0c, 0x8f, 0x8f, 0x8f, 0x3f,
0x04, 0x01, 0x27, 0x01, 0x00,
0x02, 0x11, 0x03,
0x03, 0x44, 0x00, 0x0f,
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x03, 0x21, 0x00, 0x80,
0x02, 0x3c, 0xc0,
0x02, 0x18, 0x80,
0x02, 0x22, 0xb1,
0x01, 0x20,
BUSY_WAIT,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
0x00 // end of table
}; /* epd294_init_sequence_full[] */
const uint8_t epd102_init_sequence_full[] PROGMEM =
{
2, 0x00, 0x5f, // panel setting
3, 0x2a, 0x00, 0x00, // IC hidden instructions
1, 0x04, // power on
BUSY_WAIT,
2, 0x50, 0x97, // VCOM
0
};
const uint8_t epd102_init_sequence_part[] PROGMEM =
{
0x2, 0xd2, 0x3f,
0x2, 0x00, 0x6f, // panel setting
0x5, 0x01, 0x03, 0x00, 0x26, 0x26, // power
0x2, 0x06, 0x3f,
0x3, 0x2a, 0x00, 0x00,
0x2, 0x30, 0x13, // 50Hz
0x2, 0x50, 0xf2,
0x2, 0x60, 0x22,
0x2, 0x82, 0x12, // -0.1v
0x2, 0xe3, 0x33,
// send LUTs
43, 0x23, // white
0x60 ,0x01 ,0x01 ,0x00 ,0x00 ,0x01 ,
0x80 ,0x0f ,0x00 ,0x00 ,0x00 ,0x01 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
43, 0x24, // black
0x90 ,0x01 ,0x01 ,0x00 ,0x00 ,0x01 ,
0x40 ,0x0f ,0x00 ,0x00 ,0x00 ,0x01 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,
0x1, 0x4, // power on
BUSY_WAIT,
0
};
const uint8_t epd122_init_sequence_full[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x04, 0x01, 0xaf, 0x00, 0x00, // driver output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x17, // ram start/end
0x05, 0x45, 0x00, 0x00, 0xbf, 0x00,
0x02, 0x3c, 0x05, // border waveform
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd122_init_sequence_fast[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x02, 0x11, 0x03, // data entry mode
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x22, 0xb1, // load temp value
0x01, 0x20, // execute
BUSY_WAIT,
0x03, 0x1a, 0x64, 0x00, // write temp value
0x02, 0x22, 0x91, // load temp
0x01, 0x20, // execute
BUSY_WAIT,
0x03, 0x44, 0x00, 0x17, // ram start/end
0x05, 0x45, 0x00, 0x00, 0xaf, 0x00,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd122_init_sequence_part[] PROGMEM =
{
0x02, 0x3c, 0x80, // border waveform
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x17, // ram start/end
0x05, 0x45, 0x00, 0x00, 0xaf, 0x00,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd293_init_sequence_full[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x04, 0x01, 0x27, 0x01, 0x00, // driver output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x0f, // ram start/end
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x3c, 0xc0, // border waveform
0x03, 0x21, 0x00, 0x80, // display update control
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
// less flashing (fast) updates
const uint8_t epd293_init_sequence_fast[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x22, 0xb1, // load temp value
0x01, 0x20, // execute
BUSY_WAIT,
0x03, 0x1a, 0x64, 0x00, // write temp register
0x02, 0x22, 0x91, // load temp value
0x01, 0x20, // execute
BUSY_WAIT,
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x0f, // ram start/end
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
// partial (no flash) updates
const uint8_t epd293_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03,
0x02, 0x3c, 0x80, // border waveform
0x03, 0x44, 0x00, 0x0f,
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
0x00 // end of table
};
// partial (no flash) updates
const uint8_t epd295_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03,
0x02, 0x3c, 0x80, // border waveform
0x03, 0x44, 0x00, 0x0f,
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
91, 0x32, // LUT
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00,
0x00 // end of table
};
const uint8_t epd266_init_sequence_full[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x04, 0x01, 0x27, 0x01, 0x00, // driver output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x12, // ram start/end
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x3c, 0x05, // border waveform
0x03, 0x21, 0x00, 0x80, // display update control
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
}; /* epd266_init_sequence_full[] */
const uint8_t epd266_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03,
0x02, 0x3c, 0x80, // border waveform
0x03, 0x44, 0x00, 0x12,
0x05, 0x45, 0x00, 0x00, 0x27, 0x01,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
0x00 // end of table
};
const uint8_t epd27_init_sequence_full[] PROGMEM =
{
0x04, 0x01, 0x07, 0x01, 0x00, // driver output control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x15, // ram address
0x05, 0x45, 0x00, 0x00, 0x07, 0x01,
0x02, 0x3c, 0x80, // border color
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x4e, 0x00, // ram counter x
0x03, 0x4f, 0x00, 0x00, // ram counter y
0x02, 0x22, 0xb1,
0x01, 0x20,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd27_init_sequence_part[] PROGMEM =
{
0x02, 0x11, 0x03, // data entry mode
0x02, 0x3c, 0x80, // border color
0x03, 0x44, 0x00, 0x15, // ram address
0x05, 0x45, 0x00, 0x00, 0x07, 0x01,
0x02, 0x4e, 0x00, // ram counter x
0x03, 0x4f, 0x00, 0x00, // ram counter y
0x00 // end of table
};
const uint8_t epd42b_init_sequence_full[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
0x04, 0x01, 0x2b, 0x01, 0x00, // driver output control
0x03, 0x21, 0x40, 0x00, // display update control
0x02, 0x11, 0x03, // data entry mode
0x03, 0x44, 0x00, 0x31, // ram start/end
0x05, 0x45, 0x00, 0x00, 0x2b, 0x01,
0x02, 0x3c, 0x05, // border waveform
0x02, 0x18, 0x80, // read built-in temp sensor
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0x00 // end of table
};
const uint8_t epd42b_init_sequence_fast[] PROGMEM =
{
0x01, SSD1608_SW_RESET,
BUSY_WAIT,
3, 0x21, 0x40, 0x00,
2, 0x3c, 0x05,
2, 0x1a, 0x6e, // temp register
2, 0x22, 0x91, // load temp
1, 0x20,
BUSY_WAIT,
2, 0x11, 0x3, // data entry mode
0x03, 0x44, 0x00, 0x31, // ram start/end
0x05, 0x45, 0x00, 0x00, 0x2b, 0x01,
0x02, 0x4e, 0x00,
0x03, 0x4f, 0x00, 0x00,
BUSY_WAIT,
0
};
const uint8_t epd42b_init_sequence_part[] PROGMEM =
{
0x03, 0x21, 0x00, 0x00,
0x02, 0x11, 0x03, // data entry mode
0x02, 0x3c, 0x80, // border color