From 60699af63f92f43cc4b4b9e3050fcdd2a8468281 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Wed, 10 Apr 2019 15:14:00 -0400 Subject: add opengl fronend, remove sdl frontend, refactor build system --- .../CEdev/examples/delay/autotester.json | 39 ++++++++++++++++++++++ frontends/calculator/CEdev/examples/delay/makefile | 15 +++++++++ .../calculator/CEdev/examples/delay/readme.md | 9 +++++ .../calculator/CEdev/examples/delay/src/main.c | 16 +++++++++ 4 files changed, 79 insertions(+) create mode 100644 frontends/calculator/CEdev/examples/delay/autotester.json create mode 100644 frontends/calculator/CEdev/examples/delay/makefile create mode 100644 frontends/calculator/CEdev/examples/delay/readme.md create mode 100644 frontends/calculator/CEdev/examples/delay/src/main.c (limited to 'frontends/calculator/CEdev/examples/delay') diff --git a/frontends/calculator/CEdev/examples/delay/autotester.json b/frontends/calculator/CEdev/examples/delay/autotester.json new file mode 100644 index 0000000..4eabd14 --- /dev/null +++ b/frontends/calculator/CEdev/examples/delay/autotester.json @@ -0,0 +1,39 @@ +{ + "__comment": "FIXME timing is way too lenient because the autotester framework and travis are trash", + "rom": "84pce_515.rom", + "transfer_files": [ + "bin/DEMO.8xp" + ], + "target": { + "name": "DEMO", + "isASM": true + }, + "sequence": [ + "action|launch", + "hashWait|1", + "delay|4500", + "hashWait|2", + "hashWait|3" + ], + "hashes": { + "1": { + "description": "Waiting for 5000 ms...", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "690F0EEC" ] + }, + "2": { + "description": "Done", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "948248E" ], + "timeout": 1100 + }, + "3": { + "description": "Back to the home screen (exit check)", + "start": "vram_start", + "size": "vram_16_size", + "expected_CRCs": [ "FFAF89BA", "101734A5", "9DA19F44" ] + } + } +} diff --git a/frontends/calculator/CEdev/examples/delay/makefile b/frontends/calculator/CEdev/examples/delay/makefile new file mode 100644 index 0000000..1f1b36b --- /dev/null +++ b/frontends/calculator/CEdev/examples/delay/makefile @@ -0,0 +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 diff --git a/frontends/calculator/CEdev/examples/delay/readme.md b/frontends/calculator/CEdev/examples/delay/readme.md new file mode 100644 index 0000000..0110f27 --- /dev/null +++ b/frontends/calculator/CEdev/examples/delay/readme.md @@ -0,0 +1,9 @@ +### Delay Demo + +Demonstrates using the millisecond delay function in tice.h. + +![Screenshot](screenshot.gif) + +--- + +This demo is a part of the C SDK Toolchain for use on the CE. diff --git a/frontends/calculator/CEdev/examples/delay/src/main.c b/frontends/calculator/CEdev/examples/delay/src/main.c new file mode 100644 index 0000000..2fb8c41 --- /dev/null +++ b/frontends/calculator/CEdev/examples/delay/src/main.c @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +void main(void) { + /* Clear the homescreen */ + os_ClrHome(); + + /* Wait for 5 seconds */ + os_PutStrFull("Waiting for 5000 ms..."); + delay(5000); + os_SetCursorPos(1, 22); + os_PutStrFull("Done"); + delay(100); +} -- cgit v1.2.3-101-g0448