summaryrefslogtreecommitdiff
path: root/frontends/calculator/CEdev/examples/real_time_clock/src
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/real_time_clock/src
parent761462861fc1228e65546c4e0f877d5212320082 (diff)
downloadcetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.gz
cetris-55bfff7cf6541caac172b43186cf14405185b14d.tar.bz2
cetris-55bfff7cf6541caac172b43186cf14405185b14d.zip
fix curses on linux
Diffstat (limited to 'frontends/calculator/CEdev/examples/real_time_clock/src')
-rw-r--r--frontends/calculator/CEdev/examples/real_time_clock/src/main.c78
1 files changed, 39 insertions, 39 deletions
diff --git a/frontends/calculator/CEdev/examples/real_time_clock/src/main.c b/frontends/calculator/CEdev/examples/real_time_clock/src/main.c
index 1aa24cb..fa9b881 100644
--- a/frontends/calculator/CEdev/examples/real_time_clock/src/main.c
+++ b/frontends/calculator/CEdev/examples/real_time_clock/src/main.c
@@ -1,39 +1,39 @@
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <tice.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-unsigned int seconds = 0;
-
-void main(void) {
-
- /* Clear the homescreen */
- os_ClrHome();
-
- /* Randomize things */
- srand(rtc_Time());
-
- /* Configure the RTC */
- rtc_LoadSeconds = rtc_LoadMinutes = rtc_LoadHours = rtc_LoadDays = 0;
- rtc_Control = RTC_ENABLE | RTC_LOAD | RTC_SEC_INT_SOURCE;
-
- /* Wait for the RTC to load in the new values and then acknowledge all the interrupts */
- while (rtc_IsBusy());
- rtc_IntAcknowledge = RTC_INT_MASK;
-
- /* Wait until 5 seconds have passed */
- while (seconds < 5) {
-
- /* If a second passed, increment the second counter */
- if (rtc_IntStatus & RTC_SEC_INT) {
- memset(lcd_Ram, randInt(0,255), LCD_SIZE);
- seconds++;
-
- rtc_IntAcknowledge = rtc_IntStatus;
- }
- }
-}
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <tice.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+unsigned int seconds = 0;
+
+void main(void) {
+
+ /* Clear the homescreen */
+ os_ClrHome();
+
+ /* Randomize things */
+ srand(rtc_Time());
+
+ /* Configure the RTC */
+ rtc_LoadSeconds = rtc_LoadMinutes = rtc_LoadHours = rtc_LoadDays = 0;
+ rtc_Control = RTC_ENABLE | RTC_LOAD | RTC_SEC_INT_SOURCE;
+
+ /* Wait for the RTC to load in the new values and then acknowledge all the interrupts */
+ while (rtc_IsBusy());
+ rtc_IntAcknowledge = RTC_INT_MASK;
+
+ /* Wait until 5 seconds have passed */
+ while (seconds < 5) {
+
+ /* If a second passed, increment the second counter */
+ if (rtc_IntStatus & RTC_SEC_INT) {
+ memset(lcd_Ram, randInt(0,255), LCD_SIZE);
+ seconds++;
+
+ rtc_IntAcknowledge = rtc_IntStatus;
+ }
+ }
+}