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/os_input/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/os_input/src')
| -rw-r--r-- | frontends/calculator/CEdev/examples/os_input/src/main.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/frontends/calculator/CEdev/examples/os_input/src/main.c b/frontends/calculator/CEdev/examples/os_input/src/main.c deleted file mode 100644 index a2fa7c0..0000000 --- a/frontends/calculator/CEdev/examples/os_input/src/main.c +++ /dev/null @@ -1,36 +0,0 @@ -#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <tice.h>
-
-/* Make sure to adjust those sizes according to your usage! */
-#define INPUT_SIZE 10
-#define RESP_SIZE 20
-
-/* Draw text on the homescreen at the given X/Y location */
-void print(const char* text, uint8_t xpos, uint8_t ypos) {
- os_SetCursorPos(ypos, xpos);
- os_PutStrFull(text);
-}
-
-void main(void) {
- char inputBuffer[INPUT_SIZE];
- char response[RESP_SIZE];
-
- /* Clear the homescreen */
- os_ClrHome();
-
- /* Ask the user to type a string, which gets stored in `inputBuf` */
- os_GetStringInput("What is N? ", inputBuffer, INPUT_SIZE);
-
- /* Build the user response */
- sprintf(response, "N is %s.", inputBuffer);
-
- /* Clear the homescreen and display the built response */
- os_ClrHome();
- print(response, 0, 0);
-
- /* Wait for a key press before quitting */
- while (!os_GetCSC());
-}
|