-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_main.c
40 lines (31 loc) · 1.13 KB
/
app_main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2024.
// Distributed under The Unlicense
//
#include <app/app_lcd_util.h>
#include <mcal/mcal_gpt.h>
#include <os/os.h>
#include <startup/asm_util.h>
void main(void)
{
// The main() subroutine initializes the needed hardware.
// It then launches the multitasking scheduler, which subsequently
// controls the blinky and hello-world tasks.
// Initialize the microcontroller abstraction layer peripheral
// general purpose timer.
mcal_gpt_init();
// Initialize the LCD application utilities.
app_lcd_util_init();
// Engage the multitasking scheduler. This controls both
// the blinky as well as the hello-world tasks.
// Do not return until the "ENTER" key is pressed.
os_schedule();
// De-initialize the general purpose timer.
mcal_gpt_de_init();
// Exit the Application and return to the home screen
// using the JForceCmdNoChar function. See also page 16
// in "TI-83 Plus System Routines", Third Release,
// (Jan. 25, 2002).
// _JForceCmdNoChar #0x4027
ASM("rst 0x28\n" ".dw #0x4027\n");
}