📄 main.c
字号:
/*************************************************************************
*
* Used with ICCARM and AARM.
*
* (c) Copyright IAR Systems 2006
*
* File name : main.c
* Description : Define main module
*
* History :
* 1. Date : 18, January 2007
* Author : Stanimir Bonev
* Description : Create
*
* This example project shows how to use the IAR Embedded Workbench and PowerPac
* RTOS for ARM to develop code for the IAR NXP-Giveaway demo board. It shows basic
* use of the I/O, timers, a PWM, the interrupt controller and PowerPac RTOS.
* The example show running lights on the board LEDs. The left capacitive slider
* change the speed and right change the intensity of the LEDs. When the board is
* battery powered it stop after 30 sec and start again with the PWR_ON button.
*
* $Revision: 1.0 $
**************************************************************************/
#include "RTOS.H"
#include "BSP.H"
#include "power_ctrl.h"
#include "ctrl_task.h"
#include "cap_keys_task.h"
/*************************************************************************
* Function Name: main
* Parameters: none
*
* Return: none
*
* Description: main
*
*************************************************************************/
int main(void)
{
OS_IncDI(); // Initially disable interrupts
OS_InitKern(); // initialize OS
OS_InitHW(); // initialize Hardware for OS
BSP_Init(); // User specific initializations
PowerCrltInit();
OS_CREATETASK(&TCBCapKeys, "Cap Keys Task", CapKeysTask, 100, StackCapKeys);
OS_CREATETASK(&TCBCtrl, "Control Task", CtrlTask, 50, StackCtrl);
OS_Start(); // Start multitasking
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -