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.
Fork of uVGAIII_demo by
Diff: uVGAIII/uVGAIII_Text.cpp
- Revision:
- 1:333b7b189790
- Parent:
- 0:9e5b26a137ec
--- a/uVGAIII/uVGAIII_Text.cpp Sun Mar 23 23:43:19 2014 +0000
+++ b/uVGAIII/uVGAIII_Text.cpp Mon Mar 24 17:29:15 2014 +0000
@@ -383,7 +383,7 @@
void uVGAIII :: putc(char c) // place char at current cursor position
//used by virtual printf function _putc
{
- //char command[6] ="";
+
pc.printf("\nCursor position: %d, %d",current_row,current_col);
if(c<0x20) {
if(c=='\n') {
@@ -401,13 +401,14 @@
} else {
put_char(c);
current_col++;
+ move_cursor(current_row, current_col);
}
- if (current_col == max_col) {
+ if (current_col >= max_col) {
current_col = 0;
current_row++;
move_cursor(current_row, current_col);
}
- if (current_row == max_row) {
+ if (current_row >= max_row) {
current_row = 0;
move_cursor(current_row, current_col);
}

uVGA III