diff options
-rw-r--r-- | Makefile.include | 4 | ||||
-rw-r--r-- | app/oled.c | 11 | ||||
-rw-r--r-- | doc/cs32g103.pdf | bin | 0 -> 3091285 bytes |
3 files changed, 13 insertions, 2 deletions
diff --git a/Makefile.include b/Makefile.include index e33adb3..636c314 100644 --- a/Makefile.include +++ b/Makefile.include @@ -29,8 +29,8 @@ ARCH_FLAGS = -mthumb -mcpu=cortex-m3 $(FP_FLAGS) -mfix-cortex-m3-ldrd OOCD ?= openocd OOCD_INTERFACE ?= interface/stlink-v2.cfg -OOCD_BOARD = ../target/stm32f103.cfg -#OOCD_BOARD ?= target/stm32f1x.cfg +#OOCD_BOARD = ../target/stm32f103.cfg +OOCD_BOARD ?= target/stm32f1x.cfg ################################################################################ # Black Magic Probe specific variables @@ -148,6 +148,17 @@ oled_blit_strip (uint8_t *vram, int x, int xe, uint8_t mask, int shift, { uint8_t r, s; + while (x < 0) { + x++; + src++; + }; + + if (xe < 0) xe = 0; + + if (x > SSD1306_VRAM_SIZE) xe = SSD1306_VRAM_SIZE; + + if (xe > SSD1306_VRAM_SIZE) xe = SSD1306_VRAM_SIZE; + if (shift > 0) { for (x++; x <= xe; ++x) { diff --git a/doc/cs32g103.pdf b/doc/cs32g103.pdf Binary files differnew file mode 100644 index 0000000..a4d994b --- /dev/null +++ b/doc/cs32g103.pdf |