summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/hello_world
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2019-04-13 12:40:52 -0400
committerAndrew Opalach <andrew@akon.city> 2019-04-13 12:40:52 -0400
commit55bfff7cf6541caac172b43186cf14405185b14d (patch)
treec1ae99d2b39f8df8933d81ec2e61e81050bdb410 /frontends/calculator/CEdev/examples/hello_world
parent761462861fc1228e65546c4e0f877d5212320082 (diff)
downloadcetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz
cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2
cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip
fix curses on linux
Diffstat (limited to 'frontends/calculator/CEdev/examples/hello_world')
-rw-r--r--frontends/calculator/CEdev/examples/hello_world/makefile30
-rw-r--r--frontends/calculator/CEdev/examples/hello_world/readme.md18
-rw-r--r--frontends/calculator/CEdev/examples/hello_world/src/main.c96
3 files changed, 72 insertions, 72 deletions
diff --git a/frontends/calculator/CEdev/examples/hello_world/makefile b/frontends/calculator/CEdev/examples/hello_world/makefile
index 1f1b36b..d3deba8 100644
--- a/frontends/calculator/CEdev/examples/hello_world/makefile
+++ b/frontends/calculator/CEdev/examples/hello_world/makefile
@@ -1,15 +1,15 @@
-# ----------------------------
-# Set NAME to the program name
-# Set ICON to the png icon file name
-# Set DESCRIPTION to display within a compatible shell
-# Set COMPRESSED to "YES" to create a compressed program
-# ----------------------------
-
-NAME ?= DEMO
-COMPRESSED ?= NO
-ICON ?= iconc.png
-DESCRIPTION ?= "C SDK Demo"
-
-# ----------------------------
-
-include $(CEDEV)/include/.makefile
+# ----------------------------
+# Set NAME to the program name
+# Set ICON to the png icon file name
+# Set DESCRIPTION to display within a compatible shell
+# Set COMPRESSED to "YES" to create a compressed program
+# ----------------------------
+
+NAME ?= DEMO
+COMPRESSED ?= NO
+ICON ?= iconc.png
+DESCRIPTION ?= "C SDK Demo"
+
+# ----------------------------
+
+include $(CEDEV)/include/.makefile
diff --git a/frontends/calculator/CEdev/examples/hello_world/readme.md b/frontends/calculator/CEdev/examples/hello_world/readme.md
index 880be97..0be163e 100644
--- a/frontends/calculator/CEdev/examples/hello_world/readme.md
+++ b/frontends/calculator/CEdev/examples/hello_world/readme.md
@@ -1,9 +1,9 @@
-### Hello World Demo
-
-This is a simple demo to demonstrate displaying text using the TI-OS rotuines.
-
-![Screenshot](screenshot.png)
-
----
-
-This demo is a part of the C SDK Toolchain for use on the CE.
+### Hello World Demo
+
+This is a simple demo to demonstrate displaying text using the TI-OS rotuines.
+
+![Screenshot](screenshot.png)
+
+---
+
+This demo is a part of the C SDK Toolchain for use on the CE.
diff --git a/frontends/calculator/CEdev/examples/hello_world/src/main.c b/frontends/calculator/CEdev/examples/hello_world/src/main.c
index 333dcdc..16c9dd0 100644
--- a/frontends/calculator/CEdev/examples/hello_world/src/main.c
+++ b/frontends/calculator/CEdev/examples/hello_world/src/main.c
@@ -1,48 +1,48 @@
-/* Keep these headers */
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <tice.h>
-
-/* Standard headers */
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* Put function prototypes here */
-void printText(const char *text, uint8_t x, uint8_t y);
-void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos);
-
-/* Put all your code here */
-void main(void) {
- /* uint8_t is an unsigned integer that can range from 0-255. */
- /* It performs faster than just an int, so try to use it (or int8_t) when possible */
- uint8_t count;
-
- /* Initialize some strings */
- const char *HelloWorld = "Hello World!";
- const char *Welcome = "Welcome to C!";
-
- /* Clear the homescreen */
- os_ClrHome();
-
- /* Print a few strings */
- printText(HelloWorld, 0, 0);
- printText(Welcome, 0, 1);
-
- /* Wait for a key press */
- while (!os_GetCSC());
-}
-
-/* Draw text on the homescreen at the given X/Y location */
-void printText(const char *text, uint8_t xpos, uint8_t ypos) {
- os_SetCursorPos(ypos, xpos);
- os_PutStrFull(text);
-}
-
-/* Draw small text at the given X/Y location */
-void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos) {
- os_FontSelect(0); // sets small font (1 == big, see docs)
- os_FontDrawText(text, xpos, ypos);
-}
+/* Keep these headers */
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+/* Standard headers */
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Put function prototypes here */
+void printText(const char *text, uint8_t x, uint8_t y);
+void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos);
+
+/* Put all your code here */
+void main(void) {
+ /* uint8_t is an unsigned integer that can range from 0-255. */
+ /* It performs faster than just an int, so try to use it (or int8_t) when possible */
+ uint8_t count;
+
+ /* Initialize some strings */
+ const char *HelloWorld = "Hello World!";
+ const char *Welcome = "Welcome to C!";
+
+ /* Clear the homescreen */
+ os_ClrHome();
+
+ /* Print a few strings */
+ printText(HelloWorld, 0, 0);
+ printText(Welcome, 0, 1);
+
+ /* Wait for a key press */
+ while (!os_GetCSC());
+}
+
+/* Draw text on the homescreen at the given X/Y location */
+void printText(const char *text, uint8_t xpos, uint8_t ypos) {
+ os_SetCursorPos(ypos, xpos);
+ os_PutStrFull(text);
+}
+
+/* Draw small text at the given X/Y location */
+void printTextSmall(const char *text, uint8_t xpos, uint8_t ypos) {
+ os_FontSelect(0); // sets small font (1 == big, see docs)
+ os_FontDrawText(text, xpos, ypos);
+}