Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 6:95b92f2035dc, committed 2016-11-28
- Comitter:
- dkato
- Date:
- Mon Nov 28 03:41:26 2016 +0000
- Parent:
- 5:4e96673f4830
- Child:
- 7:d782dce51ee6
- Commit message:
- Change symbol name
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Nov 25 11:28:51 2016 +0000
+++ b/main.cpp Mon Nov 28 03:41:26 2016 +0000
@@ -79,7 +79,7 @@
/* Touch panel parameter */
#define TOUCH_NUM (2u)
-#define DROW_POINT (5)
+#define DRAW_POINT (5)
/* STRING BUFFER Parameter GRAPHICS_LAYER_2 */
#define STRING_PIXEL_HW (120)
@@ -403,7 +403,7 @@
}
/****** Touch panel ******/
-static void drow_touch_pos(uint8_t * p_buf, int id, int x, int y) {
+static void draw_touch_pos(uint8_t * p_buf, int id, int x, int y) {
int idx_base;
int wk_idx;
int i;
@@ -411,17 +411,17 @@
uint8_t coller_pix[TOUCH_BUFFER_BYTE_PER_PIXEL]; /* ARGB4444 */
/* A coordinate in the upper left is calculated from a central coordinate. */
- if ((x - (DROW_POINT / 2)) >= 0) {
- x -= (DROW_POINT / 2);
+ if ((x - (DRAW_POINT / 2)) >= 0) {
+ x -= (DRAW_POINT / 2);
}
- if (x > (LCD_PIXEL_WIDTH - DROW_POINT)) {
- x = (LCD_PIXEL_WIDTH - DROW_POINT);
+ if (x > (LCD_PIXEL_WIDTH - DRAW_POINT)) {
+ x = (LCD_PIXEL_WIDTH - DRAW_POINT);
}
- if ((y - (DROW_POINT / 2)) >= 0) {
- y -= (DROW_POINT / 2);
+ if ((y - (DRAW_POINT / 2)) >= 0) {
+ y -= (DRAW_POINT / 2);
}
- if (y > (LCD_PIXEL_HEIGHT - DROW_POINT)) {
- y = (LCD_PIXEL_HEIGHT - DROW_POINT);
+ if (y > (LCD_PIXEL_HEIGHT - DRAW_POINT)) {
+ y = (LCD_PIXEL_HEIGHT - DRAW_POINT);
}
idx_base = (x + (LCD_PIXEL_WIDTH * y)) * TOUCH_BUFFER_BYTE_PER_PIXEL;
@@ -437,16 +437,16 @@
}
/* Drawing */
- for (i = 0; i < DROW_POINT; i++) {
+ for (i = 0; i < DRAW_POINT; i++) {
wk_idx = idx_base + (LCD_PIXEL_WIDTH * TOUCH_BUFFER_BYTE_PER_PIXEL * i);
- for (j = 0; j < DROW_POINT; j++) {
+ for (j = 0; j < DRAW_POINT; j++) {
p_buf[wk_idx++] = coller_pix[0];
p_buf[wk_idx++] = coller_pix[1];
}
}
}
-static void drow_touch_keyonoff(uint8_t * p_buf, int id, bool onoff) {
+static void draw_touch_keyonoff(uint8_t * p_buf, int id, bool onoff) {
int idx_base;
int wk_idx;
int i;
@@ -457,7 +457,7 @@
if (id == 0) {
idx_base = 0;
} else {
- idx_base = DROW_POINT * TOUCH_BUFFER_BYTE_PER_PIXEL;
+ idx_base = DRAW_POINT * TOUCH_BUFFER_BYTE_PER_PIXEL;
}
/* Select color */
@@ -472,9 +472,9 @@
}
/* Drawing */
- for (i = 0; i < DROW_POINT; i++) {
+ for (i = 0; i < DRAW_POINT; i++) {
wk_idx = idx_base + (LCD_PIXEL_WIDTH * TOUCH_BUFFER_BYTE_PER_PIXEL * i);
- for (j = 0; j < DROW_POINT; j++) {
+ for (j = 0; j < DRAW_POINT; j++) {
p_buf[wk_idx++] = coller_pix[0];
p_buf[wk_idx++] = coller_pix[1];
}
@@ -531,9 +531,9 @@
/* Drawing of a touch coordinate */
for (i = 0; i < TOUCH_NUM; i ++) {
printf("{valid=%d,x=%d,y=%d} ", touch_pos[i].valid, touch_pos[i].x, touch_pos[i].y);
- drow_touch_keyonoff(user_frame_buffer_touch, i, touch_pos[i].valid);
+ draw_touch_keyonoff(user_frame_buffer_touch, i, touch_pos[i].valid);
if (touch_pos[i].valid) {
- drow_touch_pos(user_frame_buffer_touch, i, touch_pos[i].x, touch_pos[i].y);
+ draw_touch_pos(user_frame_buffer_touch, i, touch_pos[i].x, touch_pos[i].y);
}
}
printf("\n");