This commit is contained in:
Sebastian 2016-12-07 00:26:43 +01:00
parent 0d81f98ab9
commit de23e0b650
14 changed files with 400 additions and 27 deletions

View File

@ -1,4 +1,5 @@
-I../sss7core -Iinclude
-Iimages
-I/usr/avr/include -I/usr/avr/include
-D__AVR_ATmega8__ -D__AVR_ATmega8__
-DF_CPU=16000000 -DF_CPU=16000000

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/bin

View File

@ -4,7 +4,8 @@ ISPPORT ?= /dev/kaboard
VERSION = 0.1 VERSION = 0.1
HEADERS = spi.h st7735.h st7735initcmds.h HEADERS = include/spi.h include/st7735.h include/st7735initcmds.h
HEADERS += images/logo_bw.h images/logo.h
SRC = main.c spi.c st7735.c SRC = main.c spi.c st7735.c
TARGET = st7735_test TARGET = st7735_test
OBJDIR = bin OBJDIR = bin
@ -17,7 +18,7 @@ SIZE = avr-size
SRC_TMP = $(subst ../,,$(SRC)) SRC_TMP = $(subst ../,,$(SRC))
OBJ = $(SRC_TMP:%.c=$(OBJDIR)/$(AVRMCU)/%.o) OBJ = $(SRC_TMP:%.c=$(OBJDIR)/$(AVRMCU)/%.o)
CFLAGS = -I ../sss7core/ -Os -Wall -Wstrict-prototypes CFLAGS = -I include -I images -Os -Wall -Wstrict-prototypes
CFLAGS += -ffunction-sections -fdata-sections CFLAGS += -ffunction-sections -fdata-sections
CFLAGS += -fshort-enums -fpack-struct -funsigned-char -funsigned-bitfields CFLAGS += -fshort-enums -fpack-struct -funsigned-char -funsigned-bitfields
CFLAGS += -mmcu=$(AVRMCU) -DF_CPU=$(F_CPU)UL -DVERSION=$(VERSION) CFLAGS += -mmcu=$(AVRMCU) -DF_CPU=$(F_CPU)UL -DVERSION=$(VERSION)
@ -33,6 +34,12 @@ start:
@echo ":: Building for $(AVRMCU)" @echo ":: Building for $(AVRMCU)"
@echo ":: MCU operating frequency is $(F_CPU)Hz" @echo ":: MCU operating frequency is $(F_CPU)Hz"
images/logo.h : images/logo.png utils/img_convert.py
python3 utils/img_convert.py $< $@
images/logo_bw.h : images/logo_bw.png utils/img_convert_mono.py
python3 utils/img_convert_mono.py $< $@
$(OBJDIR)/$(AVRMCU)/%.o : %.c $(HEADERS) Makefile $(OBJDIR)/$(AVRMCU)/%.o : %.c $(HEADERS) Makefile
@mkdir -p $$(dirname $@) @mkdir -p $$(dirname $@)
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
@ -50,6 +57,7 @@ size : $(OBJDIR)/$(AVRMCU)/$(TARGET).elf
clean : clean :
@rm -rf $(OBJDIR) @rm -rf $(OBJDIR)
@rm images/*.h
flash : all flash : all
avrdude -c arduino \ avrdude -c arduino \

40
images/logo.h Normal file
View File

@ -0,0 +1,40 @@
#ifndef _LOGO_H_
#define _LOGO_H_
#include <avr/pgmspace.h>
static const uint16_t PROGMEM logo[] = {
0x20, 0x20,
0x4081, 0x4880, 0x4880, 0x2861, 0x38c1, 0x38c1, 0x30a1, 0x3081, 0x2861, 0x1861, 0x1061, 0x28a1, 0x3060, 0x2861, 0x821, 0x1041, 0x1861, 0x821, 0x821, 0x1, 0x821, 0x1841, 0x2061, 0x1841, 0x2061, 0x2881, 0x38a1, 0x5122, 0x2104, 0x5a48, 0x5a48, 0x6aea,
0x40a1, 0x4060, 0x4060, 0x2860, 0x48a0, 0x48a0, 0x40a0, 0x3880, 0x3880, 0x3060, 0x3060, 0x2040, 0x3060, 0x3080, 0x821, 0x1882, 0x3124, 0x1861, 0x2060, 0x2061, 0x2061, 0x2880, 0x2881, 0x28a1, 0x38a1, 0x40e2, 0x4922, 0x59a4, 0x6226, 0x8b49, 0x834a, 0x800,
0x48e2, 0x3860, 0x3860, 0x3880, 0x4080, 0x48a0, 0x4080, 0x3880, 0x3080, 0x3060, 0x2860, 0x3060, 0x2860, 0x2860, 0x1800, 0xe71c, 0xffff, 0x2860, 0x3081, 0x30a1, 0x3081, 0x38a1, 0x30a1, 0x38c1, 0x40c1, 0x4901, 0x5142, 0x5163, 0x5162, 0x5983, 0x5183, 0x5163,
0x6143, 0x6040, 0x5060, 0x3881, 0x2861, 0x4880, 0x40a0, 0x48a0, 0x3880, 0x1041, 0x1021, 0x1021, 0x2061, 0x40a0, 0x830b, 0xffff, 0xffff, 0xb514, 0x38a0, 0x40a1, 0x40c1, 0x40c0, 0x40c1, 0x40c1, 0x40c1, 0x40c1, 0x40c1, 0x40e1, 0x38c1, 0x38c1, 0x40c1, 0x40e2,
0x6183, 0x5820, 0x6820, 0x5060, 0x1041, 0x4080, 0x48a0, 0x2860, 0x821, 0x801, 0x821, 0x821, 0x821, 0x2020, 0xffff, 0xef1b, 0xacd2, 0xffff, 0x5984, 0x40c1, 0x48c1, 0x48c1, 0x40c1, 0x40c1, 0x48c1, 0x48e1, 0x40c1, 0x40c1, 0x40e1, 0x40c1, 0x40c1, 0x40c1,
0x6182, 0x5881, 0x5820, 0x6020, 0x50c0, 0x50a0, 0x48a0, 0x1021, 0x1, 0x1, 0x801, 0x1, 0x1, 0x8c71, 0xffff, 0x7aca, 0xacb2, 0xffff, 0xde99, 0x4060, 0x50e1, 0x48c0, 0x40c1, 0x48c1, 0x48c1, 0x48e1, 0x48c1, 0x50e1, 0x48e1, 0x48e1, 0x48e1, 0x48c1,
0x6142, 0x60e1, 0x3001, 0x5800, 0x58a0, 0x58c0, 0x3880, 0x1, 0x0, 0x1, 0x0, 0x1, 0x1082, 0xffff, 0xffdf, 0xd638, 0x8b4b, 0xffff, 0xffff, 0x7aca, 0x48c0, 0x48c1, 0x48c1, 0x48c1, 0x48c1, 0x48c1, 0x48c1, 0x48c1, 0x40c1, 0x48c1, 0x40c1, 0x40c1,
0x5942, 0x6140, 0x5081, 0x70a1, 0x9ac4, 0x7161, 0x2860, 0x0, 0x1, 0x1, 0x0, 0x0, 0xb5b7, 0xffff, 0xffff, 0x69a5, 0x4020, 0xffff, 0xffff, 0xf7be, 0x3840, 0x48c0, 0x40a0, 0x50c1, 0x48c0, 0x40c1, 0x40a1, 0x40c1, 0x48c0, 0x40a1, 0x40a1, 0x40a1,
0x5922, 0x6140, 0x2061, 0x4000, 0xd304, 0xc2e5, 0x2840, 0x1, 0x1, 0x0, 0x1, 0x39e7, 0xffff, 0x8b8e, 0xffff, 0x832b, 0x832c, 0xf7be, 0xdeba, 0xffff, 0x9c0f, 0x40a1, 0x48a1, 0x48c1, 0x48a1, 0x40c1, 0x40a1, 0x40c1, 0x40a1, 0x40a0, 0x40a1, 0x40a1,
0x5922, 0x5921, 0x58e1, 0xeb04, 0xdb44, 0xc2e3, 0x801, 0x821, 0x0, 0x1, 0x0, 0xe73c, 0xffff, 0x72ca, 0xb4f3, 0x9c30, 0x6a27, 0xffdf, 0x9bce, 0xe6da, 0xffff, 0x38a1, 0x3880, 0x40a1, 0x38a1, 0x48a1, 0x40a1, 0x48a1, 0x48a1, 0x40a0, 0x38a1, 0x38a1,
0x5922, 0x6121, 0xb2a3, 0xaa61, 0x9a40, 0x6940, 0x1020, 0x801, 0x1, 0x1, 0x632d, 0xffff, 0xe6db, 0xef3c, 0x8b8d, 0xc596, 0xc5d6, 0xe71c, 0x40a1, 0xa451, 0xffff, 0xbd75, 0x4880, 0x48a0, 0x48a0, 0x40a1, 0x30a1, 0x38a1, 0x38a1, 0x3081, 0x38a1, 0x40a1,
0x5902, 0x6121, 0x7160, 0x6940, 0x9200, 0x7160, 0x6100, 0x801, 0x1, 0x0, 0xffff, 0xd69a, 0xef3c, 0xdeba, 0x6a28, 0xffdf, 0x7aaa, 0xd638, 0x4881, 0xffff, 0xbd96, 0xffff, 0x51a5, 0x38a1, 0x38a1, 0x40a1, 0x40a1, 0x40a1, 0x40a0, 0x48a1, 0x3881, 0x38a1,
0x5922, 0x6121, 0x6120, 0x2040, 0x8180, 0x89c0, 0x7980, 0x6100, 0x0, 0x9cd3, 0xffff, 0x3145, 0x3820, 0xb4f3, 0xffff, 0x940f, 0x8bae, 0x8b6d, 0xc5f7, 0x9bef, 0x93cf, 0xffff, 0xe6fb, 0x3800, 0x3881, 0x4081, 0x3081, 0x3081, 0x3881, 0x3881, 0x3881, 0x38a1,
0x5922, 0x5901, 0x50e0, 0x801, 0x0, 0x0, 0x1840, 0x2881, 0x3103, 0xffff, 0xa555, 0x2021, 0x3881, 0x3860, 0x93ef, 0x4081, 0xffff, 0x6a89, 0x8bce, 0x2000, 0xde79, 0xbd75, 0xffff, 0x7aeb, 0x3881, 0x3880, 0x3081, 0x3881, 0x3881, 0x3881, 0x3081, 0x3881,
0x5902, 0x50e1, 0x48e0, 0x801, 0x0, 0x0, 0x0, 0x0, 0xc618, 0xffff, 0x821, 0x1841, 0x3881, 0x3860, 0xbd55, 0xffff, 0xffff, 0xffff, 0xffdf, 0x7b0a, 0x83ef, 0x9c50, 0xe6fb, 0xffdf, 0x2820, 0x3881, 0x3881, 0x3881, 0x3881, 0x4880, 0x3881, 0x3081,
0x5902, 0x50e1, 0x48c1, 0x1, 0x1, 0x1, 0x1, 0x4a49, 0xffff, 0x73ae, 0x1, 0x1861, 0x40a2, 0x5a08, 0xde79, 0xffdf, 0x4903, 0xbd96, 0xffff, 0xa3cd, 0x93ef, 0xbdf7, 0xc5b6, 0xffff, 0x9c51, 0x3881, 0x2061, 0x2861, 0x2881, 0x3081, 0x3081, 0x2861,
0x5902, 0x50e1, 0x40c1, 0x801, 0x1, 0x1, 0x0, 0xef7d, 0xf79e, 0x0, 0x1, 0x2861, 0x3082, 0x5a08, 0xe6db, 0xf7be, 0x2861, 0xb555, 0xffff, 0x9c50, 0x72aa, 0xad55, 0xbdb6, 0xef5d, 0xffff, 0x38a2, 0x3081, 0x2861, 0x3081, 0x2861, 0x2861, 0x2061,
0x5902, 0x50e2, 0x40c1, 0x821, 0x0, 0x1, 0x738e, 0xffff, 0x4a49, 0x10a3, 0x6b4d, 0x1020, 0x3882, 0x4082, 0xb514, 0xffff, 0x3882, 0xce18, 0xffdf, 0x4902, 0xa4f4, 0x6b0c, 0xad55, 0x4186, 0xffff, 0xc5b6, 0x2820, 0x3081, 0x3881, 0x3061, 0x3061, 0x3061,
0x5903, 0x50e2, 0x40c1, 0x821, 0x1, 0x20, 0xffff, 0xc639, 0x0, 0x9cf3, 0xffff, 0x3186, 0x4041, 0x9bae, 0xa474, 0x61eb, 0x2864, 0x20c4, 0x6b6d, 0x940f, 0x83ae, 0x62aa, 0xffff, 0xef5d, 0xffff, 0xffff, 0x59e7, 0x3082, 0x3881, 0x3861, 0x3881, 0x3061,
0x6103, 0x58e2, 0x40c1, 0x1021, 0x0, 0xa534, 0xffff, 0x18e4, 0x2945, 0x9cf4, 0xce79, 0x9471, 0xce17, 0xde79, 0x1041, 0x0, 0x3145, 0x4a08, 0x1021, 0x41c7, 0x940f, 0x6b4d, 0xb555, 0x4986, 0x1800, 0xffdf, 0xef3c, 0x1800, 0x2861, 0x3061, 0x2861, 0x2061,
0x6103, 0x58e3, 0x40c2, 0x1841, 0x2104, 0xffff, 0x9cd3, 0x2945, 0xffff, 0xdedb, 0xffff, 0xf79e, 0x4a69, 0x0, 0xb596, 0xffff, 0xef5d, 0x9492, 0x1021, 0x821, 0x1082, 0xbdf8, 0xbd96, 0xe6bb, 0xa4d3, 0x72ec, 0xffff, 0x732d, 0x2062, 0x2061, 0x2861, 0x3061,
0x6125, 0x5903, 0x48c2, 0x800, 0xd69a, 0xffff, 0x0, 0x8c10, 0x738e, 0x21, 0xffdf, 0xffff, 0xc638, 0xffff, 0xc513, 0x3000, 0x0, 0x1021, 0x1041, 0x1041, 0x21, 0x801, 0xce59, 0x9c71, 0x1000, 0xbd76, 0xffff, 0xffff, 0x3040, 0x2862, 0x1861, 0x2861,
0x6926, 0x5905, 0x48e4, 0x6aab, 0xffff, 0x6b4d, 0x2041, 0xa430, 0x7bef, 0x1, 0x2124, 0xffff, 0xffff, 0xf79e, 0xbcd2, 0xa3ae, 0x0, 0x1062, 0x1041, 0x1042, 0x822, 0x1062, 0x0, 0x8c30, 0xffff, 0x836e, 0x30e4, 0xffff, 0xa4b2, 0x3061, 0x2861, 0x2861,
0x6928, 0x6107, 0x4865, 0xf7be, 0xef5d, 0x0, 0x1021, 0x5081, 0x1042, 0x1, 0x1, 0x0, 0x3187, 0x4a4b, 0x83cf, 0xb5b7, 0xef3d, 0x2105, 0x823, 0x822, 0x1043, 0x1042, 0x1042, 0x821, 0x624b, 0xffff, 0xbd76, 0xb555, 0xffff, 0x30e3, 0x2861, 0x3061,
0x7129, 0x690a, 0xac54, 0xffff, 0x39a7, 0x0, 0x800, 0x1000, 0x1, 0x0, 0x1, 0x1, 0x2, 0x3, 0x3, 0x1, 0x526a, 0x7bcf, 0x802, 0x824, 0x1029, 0x102d, 0x102d, 0x823, 0x1843, 0x30e5, 0xef5d, 0xffff, 0xffff, 0xce18, 0x3000, 0x3882,
0x792b, 0x694d, 0xffff, 0xffdf, 0xbdf7, 0xc638, 0xc638, 0xc638, 0xc638, 0xc638, 0xc638, 0xc638, 0xc639, 0xc63a, 0xc63a, 0xc639, 0xc639, 0xc618, 0xc63a, 0xc63d, 0xc63e, 0xc6bf, 0xc63d, 0xc63a, 0xc638, 0xc638, 0xce38, 0xffff, 0xffff, 0xffff, 0x6294, 0x2883,
0x792c, 0x79f1, 0xef3e, 0xe6fe, 0xe6dd, 0xdedb, 0xdedb, 0xdedb, 0xdedc, 0xdedb, 0xdedc, 0xdedc, 0xdedd, 0xe6fe, 0xdedd, 0xe6de, 0xde9f, 0xe7ff, 0xe7ff, 0xe7ff, 0xe7ff, 0xe7ff, 0xdf7f, 0xdeff, 0xdedc, 0xdedb, 0xdedb, 0xdedb, 0xdedc, 0xdefc, 0x526d, 0x2061,
0x796f, 0x7191, 0x7237, 0x597b, 0x3055, 0x809, 0x2, 0x3, 0x2, 0x1087, 0x188a, 0x9, 0x815, 0x52bb, 0x17e, 0x147e, 0x27bf, 0x37bf, 0x3f9f, 0x67bf, 0x57bf, 0x3f9f, 0x275f, 0x17e, 0x12, 0x316c, 0x0, 0x0, 0x5, 0x80d, 0x2061, 0x1041,
0x814e, 0x7191, 0xb4db, 0x615e, 0xa4bc, 0x947b, 0xad36, 0x6330, 0x9cb5, 0x8c55, 0x8416, 0xa4fa, 0x54be, 0x86bf, 0x77fe, 0x7ffe, 0xa7ff, 0x9fdf, 0xbfff, 0xbfdf, 0xd7ff, 0x7fbf, 0xc7df, 0x8f5f, 0x2159, 0xdedd, 0x4209, 0xd679, 0x630f, 0x6b39, 0x1841, 0x821,
0x816f, 0x79b2, 0xac3b, 0x937f, 0xb53f, 0x83ff, 0x647e, 0x7b54, 0x8417, 0x39b5, 0x41b7, 0x8e1e, 0x7ffe, 0x87fe, 0x7ffe, 0x4ffe, 0x9fff, 0x77ff, 0xb7ff, 0xa7df, 0x8fdf, 0x97df, 0x9fdf, 0x9fdf, 0x3b7e, 0x7c1b, 0x528c, 0x6b51, 0x637d, 0x1012, 0x1862, 0x821,
0x896f, 0x79d3, 0x7a1a, 0x7a5f, 0x6b1f, 0x545f, 0x373f, 0x3ebe, 0x2979, 0x11fc, 0x567e, 0x77fe, 0x67fd, 0x5ffd, 0x67fd, 0x6ffe, 0x77fe, 0x6fff, 0x67ff, 0x5fdf, 0x5fdf, 0x57df, 0x5fdf, 0x5fbf, 0x577f, 0x80d, 0x805, 0x870, 0x18b4, 0x2070, 0x1045, 0x1021,
0x896f, 0x79d4, 0x7a3a, 0x7a7f, 0x733f, 0x54bf, 0x3f1f, 0x4ffe, 0x7f1f, 0xaffe, 0x8ffe, 0x87fe, 0x77fe, 0x77fe, 0x77fe, 0x6ffe, 0x87fe, 0x87ff, 0x6fff, 0x67df, 0x5fbf, 0x5fbf, 0x5fbf, 0x5fbf, 0x579f, 0x3d3b, 0x1031, 0x82b, 0x211b, 0x2072, 0x1025, 0x1042,
};
#endif

BIN
images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

136
images/logo_bw.h Normal file
View File

@ -0,0 +1,136 @@
#include <avr/pgmspace.h>
#ifndef _LOGO_BW_H_
#define _LOGO_BW_H_
static const uint8_t PROGMEM logo_bw[] = {
0xa0, 0x80,
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ff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7, 0x0,
0x0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0x0,
0x0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0x0,
0x0, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf, 0x0,
0x0, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7, 0x0,
0x0, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3, 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, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
};
#endif

BIN
images/logo_bw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -10,11 +10,11 @@ static inline void spi_write(uint8_t byte) {
while(!(SPSR & (1<<SPIF))); while(!(SPSR & (1<<SPIF)));
} }
static inline void spi_set_cs() { static inline void spi_set_cs(void) {
PORTB |= (1 << PB2); PORTB |= (1 << PB2);
} }
static inline void spi_unset_cs() { static inline void spi_unset_cs(void) {
PORTB &= ~(1 << PB2); PORTB &= ~(1 << PB2);
} }

View File

@ -1,6 +1,8 @@
#ifndef _ST7735_H_ #ifndef _ST7735_H_
#define _ST7735_H_ #define _ST7735_H_
#include <avr/pgmspace.h>
#include<stdint.h> #include<stdint.h>
static const uint8_t st7735_default_width = 128; static const uint8_t st7735_default_width = 128;
@ -91,14 +93,14 @@ void st7735_init(void);
void st7735_set_orientation(enum ST7735_ORIENTATION orientation); void st7735_set_orientation(enum ST7735_ORIENTATION orientation);
void st7735_draw_pixel(int16_t x, int16_t y, uint16_t color); void st7735_draw_pixel(uint8_t x, uint8_t y, uint16_t color);
void st7735_fill_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color); void st7735_fill_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t color);
static inline void st7735_draw_fast_vline(int16_t x, int16_t y, int16_t h, uint16_t color) { static inline void st7735_draw_fast_vline(uint8_t x, uint8_t y, uint8_t h, uint16_t color) {
st7735_fill_rect(x, y, 1, h, color); st7735_fill_rect(x, y, 1, h, color);
} }
static inline void st7735_draw_fast_hline(int16_t x, int16_t y, int16_t w, uint16_t color) { static inline void st7735_draw_fast_hline(uint8_t x, uint8_t y, uint8_t w, uint16_t color) {
st7735_fill_rect(x, y, w, 1, color); st7735_fill_rect(x, y, w, 1, color);
} }
@ -106,4 +108,8 @@ static inline uint16_t st7735_color(uint8_t r, uint8_t g, uint8_t b) {
return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3); return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
} }
void st7735_draw_bitmap(uint8_t x, uint8_t y, PGM_P bitmap);
void st7735_draw_mono_bitmap(uint8_t x, uint8_t y, PGM_P bitmap, uint16_t color_set, uint16_t color_unset);
#endif #endif

View File

@ -103,7 +103,7 @@ static const uint8_t PROGMEM st7735_red_init1[] = { // Init for 7735R, part 1 (r
0xC8, // row addr/col addr, bottom to top refresh 0xC8, // row addr/col addr, bottom to top refresh
ST7735_COLMOD, 1, // 15: set color mode, 1 arg, no delay: ST7735_COLMOD, 1, // 15: set color mode, 1 arg, no delay:
0x05 // 16-bit color 0x05 // 16-bit color
}; };
static const uint8_t PROGMEM st7735_red_init_green2[] = { // Init for 7735R, part 2 (green tab only) static const uint8_t PROGMEM st7735_red_init_green2[] = { // Init for 7735R, part 2 (green tab only)
2, // 2 commands in list: 2, // 2 commands in list:
@ -113,7 +113,7 @@ static const uint8_t PROGMEM st7735_red_init_green2[] = { // Init for 7735R, par
ST7735_RASET, 4, // 2: Row addr set, 4 args, no delay: ST7735_RASET, 4, // 2: Row addr set, 4 args, no delay:
0x00, 0x01, // XSTART = 0 0x00, 0x01, // XSTART = 0
0x00, 0x9F+0x01 // XEND = 159 0x00, 0x9F+0x01 // XEND = 159
}; };
static const uint8_t PROGMEM st7735_red_init_red2[] = { // Init for 7735R, part 2 (red tab only) static const uint8_t PROGMEM st7735_red_init_red2[] = { // Init for 7735R, part 2 (red tab only)
2, // 2 commands in list: 2, // 2 commands in list:

19
main.c
View File

@ -4,18 +4,19 @@
#include "spi.h" #include "spi.h"
#include "st7735.h" #include "st7735.h"
void main() { #include "logo.h"
#include "logo_bw.h"
int main(void) {
spi_init(); spi_init();
st7735_init(); st7735_init();
st7735_set_orientation(ST7735_LANDSCAPE); st7735_set_orientation(ST7735_LANDSCAPE);
st7735_fill_rect(0, 0, 160, 128, ST7735_COLOR_GREEN); st7735_fill_rect(0, 0, 160, 128, ST7735_COLOR_BLACK);
st7735_fill_rect(0, 0, 80, 127, ST7735_COLOR_RED);
st7735_fill_rect(0, 0, 80, 64, ST7735_COLOR_CYAN);
st7735_draw_fast_hline(80, 64, 40, ST7735_COLOR_BLUE);
st7735_draw_fast_vline(120, 64, 32, ST7735_COLOR_BLUE);
st7735_draw_mono_bitmap(0, 0, &logo_bw, ST7735_COLOR_WHITE, ST7735_COLOR_BLACK);
st7735_draw_bitmap(10, 10, &logo);
while(1);
} }

View File

@ -12,19 +12,19 @@ uint8_t st7735_width = 0;
uint8_t st7735_height = 0; uint8_t st7735_height = 0;
enum ST7735_ORIENTATION st7735_orientation = ST7735_LANDSCAPE; enum ST7735_ORIENTATION st7735_orientation = ST7735_LANDSCAPE;
static inline void st7735_set_rs() { static inline void st7735_set_rs(void) {
PORTD |= (1 << PD6); PORTD |= (1 << PD6);
} }
static inline void st7735_unset_rs() { static inline void st7735_unset_rs(void) {
PORTD &= ~(1 << PD6); PORTD &= ~(1 << PD6);
} }
static inline void st7735_set_rst() { static inline void st7735_set_rst(void) {
PORTD |= (1 << PD7); PORTD |= (1 << PD7);
} }
static inline void st7735_unset_rst() { static inline void st7735_unset_rst(void) {
PORTD &= ~(1 << PD7); PORTD &= ~(1 << PD7);
} }
@ -50,7 +50,7 @@ static inline void st7735_write_color(uint16_t color) {
} }
static inline void st7735_reset() { static inline void st7735_reset(void) {
spi_unset_cs(); spi_unset_cs();
st7735_set_rst(); st7735_set_rst();
_delay_ms(500); _delay_ms(500);
@ -243,7 +243,7 @@ void st7735_set_addr_win(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1) {
st7735_write_cmd(ST7735_RAMWR); // write to RAM st7735_write_cmd(ST7735_RAMWR); // write to RAM
} }
void st7735_draw_pixel(int16_t x, int16_t y, uint16_t color) { void st7735_draw_pixel(uint8_t x, uint8_t y, uint16_t color) {
if(x < 0 || x >= st7735_width || y < 0 || y >= st7735_height){ if(x < 0 || x >= st7735_width || y < 0 || y >= st7735_height){
return; return;
} }
@ -259,7 +259,7 @@ void st7735_draw_pixel(int16_t x, int16_t y, uint16_t color) {
} }
void st7735_fill_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) { void st7735_fill_rect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint16_t color) {
if(x >= st7735_width || y >= st7735_height) { if(x >= st7735_width || y >= st7735_height) {
return; return;
} }
@ -284,3 +284,79 @@ void st7735_fill_rect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color
spi_set_cs(); spi_set_cs();
} }
void st7735_draw_bitmap(uint8_t x, uint8_t y, PGM_P bitmap) {
if(x >= st7735_width || y >= st7735_height) {
return;
}
uint8_t w = pgm_read_word(bitmap);
bitmap += 2;
uint8_t h = pgm_read_word(bitmap);
bitmap += 2;
if((x + w - 1) >= st7735_width) {
return;
}
if((y + h - 1) >= st7735_height) {
return;
}
st7735_set_addr_win(x, y, x + w - 1, y + h - 1);
st7735_set_rs();
spi_unset_cs();
for(uint8_t i = 0; i < h; i++) {
for(uint8_t j = 0; j < w; j++) {
uint16_t color = pgm_read_word(bitmap);
st7735_write_color(color);
bitmap += 2;
}
}
spi_set_cs();
}
void st7735_draw_mono_bitmap(uint8_t x, uint8_t y, PGM_P bitmap, uint16_t color_set, uint16_t color_unset) {
uint8_t w = pgm_read_byte(bitmap++);
uint8_t h = pgm_read_byte(bitmap++);
if(x >= st7735_width || y >= st7735_height) {
return;
}
if((x + w - 1) >= st7735_width) {
return;
}
if((y + h - 1) >= st7735_height) {
return;
}
st7735_set_addr_win(x, y, x + w - 1, y + h - 1);
st7735_set_rs();
spi_unset_cs();
uint16_t bit_pos = 0;
uint8_t byte = 0;
for(uint8_t i = 0; i < h; i++) {
for(uint8_t j = 0; j < w; j++) {
if(bit_pos % 8 == 0) {
byte = pgm_read_byte(bitmap++);
}
if(byte & (1 << (bit_pos % 8))) {
st7735_write_color(color_set);
}
else {
st7735_write_color(color_unset);
}
bit_pos++;
}
}
spi_set_cs();
}

48
utils/img_convert.py Normal file
View File

@ -0,0 +1,48 @@
#!/usr/bin/env python3
import sys
import os
from PIL import Image
def main():
if len(sys.argv) != 3:
print("Usage: %s <image> <output file>" % sys.argv[0])
sys.exit(-1)
img = Image.open(sys.argv[1]).convert('RGB')
width, height = img.size
print("Size: %d x %d = %d bytes" % (width, height, width * height * 2))
file_name = os.path.basename(sys.argv[2])
include_guard = file_name.replace('.','_').upper()
variable_name = '_'.join(file_name.split('.')[:-1])
output_file = open(sys.argv[2], 'w')
output_file.write("#ifndef _%s_\n" % include_guard)
output_file.write("#define _%s_\n" % include_guard)
output_file.write("#include <avr/pgmspace.h>\n\n")
output_file.write("static const uint16_t PROGMEM %s[] = {\n" % variable_name)
output_file.write("\t0x%x, 0x%x,\n" % (width, height))
for y in range(0, height):
output_file.write("\t")
for x in range(0, width):
r, g, b = img.getpixel((x, y))
packed_color = ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3)
output_file.write("0x%x, " % packed_color)
output_file.write("\n")
output_file.write("};\n")
output_file.write("#endif\n")
output_file.close()
if __name__ == '__main__':
main()

56
utils/img_convert_mono.py Normal file
View File

@ -0,0 +1,56 @@
#!/usr/bin/env python3
import sys
import os
from PIL import Image
def main():
if len(sys.argv) != 3:
print("Usage: %s <image> <output file>" % sys.argv[0])
sys.exit(-1)
img = Image.open(sys.argv[1]).convert('RGB')
width, height = img.size
print("Size: %d x %d = %d bytes" % (width, height, width * height / 8))
file_name = os.path.basename(sys.argv[2])
include_guard = file_name.replace('.','_').upper()
variable_name = '_'.join(file_name.split('.')[:-1])
output_file = open(sys.argv[2], 'w')
output_file.write("#include <avr/pgmspace.h>\n\n")
output_file.write("#ifndef _%s_\n" % include_guard)
output_file.write("#define _%s_\n" % include_guard)
output_file.write("static const uint8_t PROGMEM %s[] = {\n" % variable_name)
output_file.write("\t0x%x, 0x%x,\n" % (width, height))
bit_pos = 0
bits = 0
for y in range(0, height):
output_file.write("\t")
for x in range(0, width):
r, g, b = img.getpixel((x, y))
if (r + b + g) / 3 > 127:
bits = bits | (1 << (bit_pos % 8))
bit_pos += 1
if bit_pos % 8 == 0:
output_file.write("0x%x, " % bits)
bits = 0
output_file.write("\n")
output_file.write("};\n")
output_file.write("#endif\n")
output_file.close()
if __name__ == '__main__':
main()