diff options
| author | 2019-04-24 11:03:58 -0400 | |
|---|---|---|
| committer | 2019-04-24 11:03:58 -0400 | |
| commit | 4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09 (patch) | |
| tree | fe63c3525b2e14f12b4492f87d3e875c4dcec0e4 /frontends/calculator/CEdev/examples/hello_world/src | |
| parent | 6152e965868f3e010c79d91ce3da0036758fda4d (diff) | |
| download | cetris-4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09.tar.gz cetris-4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09.tar.bz2 cetris-4d9d7b5600ab615d68f671df5f8bc6c9fe4a5a09.zip | |
add pause to curses, remove unfinished calculator frontend
Diffstat (limited to 'frontends/calculator/CEdev/examples/hello_world/src')
| -rw-r--r-- | frontends/calculator/CEdev/examples/hello_world/src/main.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/frontends/calculator/CEdev/examples/hello_world/src/main.c b/frontends/calculator/CEdev/examples/hello_world/src/main.c deleted file mode 100644 index 16c9dd0..0000000 --- a/frontends/calculator/CEdev/examples/hello_world/src/main.c +++ /dev/null @@ -1,48 +0,0 @@ -/* 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);
-}
|