aboutsummaryrefslogtreecommitdiffstats
path: root/src/display_draw.c
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2018-03-01 13:03:40 -0500
committerClyne Sullivan <tullivan99@gmail.com>2018-03-01 13:03:40 -0500
commit51b884c44c858aa56aae6675a2c3a8b2d882768e (patch)
treeaf052ed484d44e6594b18f01a4edceabd99b852c /src/display_draw.c
parent4614429f5751e14e37ceedb7130b7a829c89476a (diff)
keypad support, making stuff good
Diffstat (limited to 'src/display_draw.c')
-rw-r--r--src/display_draw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display_draw.c b/src/display_draw.c
index 27ed796..a315bf7 100644
--- a/src/display_draw.c
+++ b/src/display_draw.c
@@ -92,12 +92,12 @@ void dsp_rect(int x, int y, int w, int h, uint16_t color)
{
dsp_set_addr(x, y, x + w - 1, y + h - 1);
int countdown = w * h;
+ LOCK;
do {
- LOCK;
dsp_write_data(color >> 8);
dsp_write_data(color & 0xFF);
- UNLOCK;
} while (countdown--);
+ UNLOCK;
}
void dsp_line(int x, int y, int i, int j, uint16_t color)