|
|
|
@ -4,7 +4,8 @@
|
|
|
|
#include "../../device/ps2controller.h"
|
|
|
|
#include "../../device/ps2controller.h"
|
|
|
|
#include "../../object/outputstream.h"
|
|
|
|
#include "../../object/outputstream.h"
|
|
|
|
#include "../../device/textstream.h"
|
|
|
|
#include "../../device/textstream.h"
|
|
|
|
|
|
|
|
#include "../../sync/ticketlock.h"
|
|
|
|
|
|
|
|
#include "../../arch/core.h"
|
|
|
|
char text[] = "Ich mag\n\
|
|
|
|
char text[] = "Ich mag\n\
|
|
|
|
Saftige Pflaumen voller Aroma\n\
|
|
|
|
Saftige Pflaumen voller Aroma\n\
|
|
|
|
Ich knuddel jede Oma ins Koma\n\
|
|
|
|
Ich knuddel jede Oma ins Koma\n\
|
|
|
|
@ -19,7 +20,7 @@ Und wacht sie aus'm Koma auf, kriegt sie von mir 'n Sticker\n\
|
|
|
|
\n";
|
|
|
|
\n";
|
|
|
|
|
|
|
|
|
|
|
|
extern TextStream kout;
|
|
|
|
extern TextStream kout;
|
|
|
|
|
|
|
|
extern Ticketlock ticketlock;
|
|
|
|
void activeWaitDelay(uint64_t cycles) {
|
|
|
|
void activeWaitDelay(uint64_t cycles) {
|
|
|
|
uint64_t counter = 0; // Use volatile to prevent optimization
|
|
|
|
uint64_t counter = 0; // Use volatile to prevent optimization
|
|
|
|
for (uint64_t i = 0; i < cycles; ++i) {
|
|
|
|
for (uint64_t i = 0; i < cycles; ++i) {
|
|
|
|
@ -31,6 +32,8 @@ void activeWaitDelay(uint64_t cycles) {
|
|
|
|
void Application::action() { // NOLINT
|
|
|
|
void Application::action() { // NOLINT
|
|
|
|
uint16_t cnt = 0;
|
|
|
|
uint16_t cnt = 0;
|
|
|
|
while (1) {
|
|
|
|
while (1) {
|
|
|
|
|
|
|
|
Core::Interrupt::disable();
|
|
|
|
|
|
|
|
ticketlock.lock();
|
|
|
|
while(text[cnt++] != '\n'){
|
|
|
|
while(text[cnt++] != '\n'){
|
|
|
|
kout << text[cnt-1];
|
|
|
|
kout << text[cnt-1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -39,5 +42,8 @@ void Application::action() { // NOLINT
|
|
|
|
activeWaitDelay(1000000000);
|
|
|
|
activeWaitDelay(1000000000);
|
|
|
|
if(cnt >= sizeof(text)-1)
|
|
|
|
if(cnt >= sizeof(text)-1)
|
|
|
|
cnt=0;
|
|
|
|
cnt=0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ticketlock.unlock();
|
|
|
|
|
|
|
|
Core::Interrupt::enable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|