summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfishsoupisgood <github@madingley.org>2020-06-18 10:07:21 +0100
committerfishsoupisgood <github@madingley.org>2020-06-18 10:07:21 +0100
commitf7b7cf9e80200cade938d47527e39034c75b9b6d (patch)
tree28946e1243122e46fe0863e3283cd41859d45a41
parente7b97eb910cbaa9d6906aedd31d1ac49e1487059 (diff)
downloadrobs_speedo-f7b7cf9e80200cade938d47527e39034c75b9b6d.tar.gz
robs_speedo-f7b7cf9e80200cade938d47527e39034c75b9b6d.tar.bz2
robs_speedo-f7b7cf9e80200cade938d47527e39034c75b9b6d.zip
rudimentary clipping
-rw-r--r--Makefile.include4
-rw-r--r--app/oled.c11
-rw-r--r--doc/cs32g103.pdfbin0 -> 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
diff --git a/app/oled.c b/app/oled.c
index e5edfed..63a47fc 100644
--- a/app/oled.c
+++ b/app/oled.c
@@ -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
new file mode 100644
index 0000000..a4d994b
--- /dev/null
+++ b/doc/cs32g103.pdf
Binary files differ