discoverpixy
app.c
Go to the documentation of this file.
1 /**************************************************************************************************************************************
2 * Project: discoverpixy
3 * Website: https://github.com/t-moe/discoverpixy
4 * Authors: Aaron Schmocker, Timo Lang
5 * Institution: BFH Bern University of Applied Sciences
6 * File: common/app/app.c
7 *
8 * Version History:
9 * Date Autor Email SHA Changes
10 * 2015-04-03 timolang@gmail.com 51089aa Refactored Project Structure for use with emulator
11 * 2015-04-03 timolang@gmail.com 1f2af9f Added more tft functions to common and emulator. Fixed eventloop.
12 * 2015-04-03 timolang@gmail.com cab8609 Integrated pixy into emulator. Pixy is no longer in the common/libs folder but in emulator/libs and discovery/libs
13 * 2015-04-03 timolang@gmail.com 1aa9194 Fixed Drawing of rects in Emulator. Got frames from pixy to emulator. Slooooow.
14 * 2015-04-25 timolang@gmail.com 416883c Pixy&Usb work with the new folder structure now.
15 * 2015-04-25 timolang@gmail.com 3d1e4b2 Simplified code a bit. Emulator does not work stable when replugging pixy.
16 * 2015-04-25 timolang@gmail.com 0858b0d Fixed some bugs when receiving large data.
17 * 2015-04-27 timolang@gmail.com 259d446 Added touch support to emulator. Implemented basic touch function.
18 * 2015-04-27 aaron@duckpond.ch aed90ef Drawcircle added (emulator)
19 * 2015-04-27 timolang@gmail.com e249fb2 Added font support
20 * 2015-04-27 timolang@gmail.com 7c9eabc Added button support.
21 * 2015-04-27 timolang@gmail.com b300ac5 Added Checkbox support
22 * 2015-04-27 timolang@gmail.com cf72baa Introduced a Screen (sub) module and divided app into multiple screens.
23 * 2015-05-10 timolang@gmail.com e2bce8f Added filesystem module, tests and implementation for it in emulator.
24 * 2015-05-12 aaron@duckpond.ch aec62d4 Added datasheets, updated touchsupport.
25 * 2015-05-28 aaron@duckpond.ch 5bda699 implemented functions to get x and y coordinates and a test function
26 * 2015-05-29 aaron@duckpond.ch 7d2d1a1 Implemented basic sampling and averaging of touch coordinates using timer7
27 *
28 **************************************************************************************************************************************/
29 
30 #include "app.h"
31 #include "tft.h"
32 #include "system.h"
33 #include "touch.h"
34 #include "screen_main.h"
35 #include "filesystem.h"
36 
37 void app_init()
38 {
39  system_init();
40  tft_init();
41  touch_init();
43 
45 }
46 
47 //app event loop
49 {
50 
51  system_process(); //Let the system handle it's pending events
52  gui_screen_update(); //update the currently active screen
53 }
void gui_screen_update()
Definition: screen.c:41
SCREEN_STRUCT * get_screen_main()
Definition: screen_main.c:196
bool gui_screen_navigate(SCREEN_STRUCT *screen)
Definition: screen.c:74
bool system_init()
Definition: system.c:21
void app_process()
Definition: app.c:48
void system_process()
Definition: system.c:31
bool filesystem_init()
Definition: filesystem.c:18
bool tft_init()
Definition: tft.c:39
bool touch_init()
Definition: touch.c:61
void app_init()
Definition: app.c:37