📄 bldc_sensor.c
字号:
/** ###################################################################
** Filename : BLDC_sensor.C
** Project : BLDC_sensor
** Processor : 56F8013VFAE
** Version : Driver 01.09
** Compiler : Metrowerks DSP C Compiler
** Date/Time : 2006-07-24, 15:45
** Abstract :
** Main module.
** Here is to be placed user's code.
** Settings :
** Contents :
** No public methods
**
** (c) Copyright UNIS, spol. s r.o. 1997-2004
** UNIS, spol. s r.o.
** Jundrovska 33
** 624 00 Brno
** Czech Republic
** http : www.processorexpert.com
** mail : info@processorexpert.com
** ###################################################################*/
/* MODULE BLDC_sensor */
/* Including used modules for compiling procedure */
#include "Cpu.h"
#include "HallSensor1.h"
#include "HallSensor2.h"
#include "HallSensor3.h"
#include "LED1.h"
#include "Inhr1.h"
#include "LED2.h"
#include "Inhr2.h"
#include "LED3.h"
#include "Inhr3.h"
/* Include shared modules, which are used for whole project */
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
void ISR_HallSensor1(void)
{
#pragma interrupt
LED1_Toggle();
PESL(TMR0, QT_CLEAR_FLAG, QT_COMPARE_FLAG);
}
void ISR_HallSensor2(void)
{
#pragma interrupt
LED2_Toggle();
PESL(TMR1, QT_CLEAR_FLAG, QT_COMPARE_FLAG);
}
void ISR_HallSensor3(void)
{
#pragma interrupt
LED3_Toggle();
PESL(TMR2, QT_CLEAR_FLAG, QT_COMPARE_FLAG);
}
void main(void)
{
/*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
/* Write your code here */
PESL(GPIOB, GPIO_SETAS_PERIPHERAL, BIT_2);
PESL(GPIOB, GPIO_SETAS_PERIPHERAL, BIT_4);
PESL(GPIOB, GPIO_SETAS_PERIPHERAL, BIT_5);
PESL(SIM, SYS_SET_PADS_FUNCTION, SYS_GPIOB2_T2);
for(;;) {}
}
/* END BLDC_sensor */
/*
** ###################################################################
**
** This file was created by UNIS Processor Expert 2.96 [03.65]
** for the Freescale 56800 series of microcontrollers.
**
** ###################################################################
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -