📄 main.c
字号:
#include "dismgr.h"
#include <message.h>
#include <print.h>
#include <i2c.h>
#include <pio.h>
#include <stdlib.h>
static TaskData app_task;
static const char prompt1[] = "Cambridge";
static const char prompt2[] = "Silicon";
static const char prompt3[] = "Radio";
static const char prompt4[] = "** CSR **";
static void app_handler (Task task, MessageId id, Message message)
{
if (id % 10 == 1)
{
DismgrScrollType t = DISMGR_SCROLL_TYPE_NONE;
DismgrDisplayPrompt ((const ucs2char *) prompt1, sizeof (prompt1) / sizeof (prompt1[0]) - 1 /*- (t == DISMGR_SCROLL_TYPE_NONE ? 0 : 3)*/, 10, 94, TRUE, t);
}
else if (id % 10 == 2)
{
DismgrScrollType t = DISMGR_SCROLL_TYPE_NONE;
DismgrDisplayPrompt ((const ucs2char *) prompt2, sizeof (prompt2) / sizeof (prompt2[0]) - 1 /*- (t == DISMGR_SCROLL_TYPE_NONE ? 0 : 3)*/, 10, 94, TRUE, t);
}
else if (id % 10 == 3)
{
DismgrScrollType t = DISMGR_SCROLL_TYPE_NONE;
DismgrDisplayPrompt ((const ucs2char *) prompt3, sizeof (prompt3) / sizeof (prompt3[0]) - 1 /*- (t == DISMGR_SCROLL_TYPE_NONE ? 0 : 3)*/, 10, 94, TRUE, t);
}
else if (id % 10 == 4)
{
DismgrScrollType t = DISMGR_SCROLL_TYPE_NONE;
DismgrDisplayPrompt ((const ucs2char *) prompt4, sizeof (prompt4) / sizeof (prompt4[0]) - 1 /*- (t == DISMGR_SCROLL_TYPE_NONE ? 0 : 3)*/, 10, 94, TRUE, t);
}
else id =0;
MessageSendLater (&app_task, id + 1, NULL, 1500);
}
int main (void)
{
app_task.handler = app_handler;
DismgrInit ();
MessageSendLater (&app_task, 1, NULL, 0);
MessageLoop ();
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -