本文整理汇总了C++中ROM_TimerIntClear函数的典型用法代码示例。如果您正苦于以下问题:C++ ROM_TimerIntClear函数的具体用法?C++ ROM_TimerIntClear怎么用?C++ ROM_TimerIntClear使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ROM_TimerIntClear函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: Timer0BIntHandler
//---- INT Handlers ----//
void Timer0BIntHandler(void)
{
//
// Clear the timer interrupt flag.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
//
// Update the periodic interrupt counter.
//
g_ui32Counter++;
//
// Once NUMBER_OF_INTS interrupts have been received, turn off the
// TIMER0B interrupt.
//
if(g_ui32Counter == NUMBER_OF_INTS)
{
//
// Disable the Timer0B interrupt.
//
ROM_IntDisable(INT_TIMER0B);
//
// Turn off Timer0B interrupt.
//
ROM_TimerIntDisable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
//
// Clear any pending interrupt flag.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
}
}
开发者ID:gabriellemerritt,项目名称:spring2015,代码行数:36,代码来源:dymxl.c
示例2: Timer3IntHandler
//*****************************************************************************
//
// The interrupt handler for the fourth timer interrupt. (light)
//
//*****************************************************************************
void
Timer3IntHandler(void)
{
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(TIMER3_BASE, TIMER_TIMA_TIMEOUT);
// Get the timer value and reset it
ROM_TimerDisable(TIMER5_BASE, TIMER_A);
// Get the timer value
Timer = ROM_TimerValueGet(TIMER5_BASE, TIMER_A);
// Reset the timer value to 65000
ROM_TimerLoadSet(TIMER5_BASE, TIMER_A, 65000); // Timer5
ROM_TimerEnable(TIMER5_BASE, TIMER_A);
//
// Toggle the flag for the light timer.
//
HWREGBITW(&g_ui32InterruptFlags, 2) = 1;
//
// Update the interrupt status.
//
}
开发者ID:keithlueneburg,项目名称:TCES430-projects,代码行数:33,代码来源:timers.c
示例3: Timer0IntHandler
//*****************************************************************************
//
// The interrupt handler for the real time clock interrupt.
//
//*****************************************************************************
void
Timer0IntHandler(void)
{
//Real time clock interrupt, keep track of days, hours, minutes, seconds
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
//Increment Timer A Count
TimerACount++;
RTC_Seconds = (TimerACount / 10);
RTC_Minutes = (RTC_Seconds / 60);
RTC_Hours = (RTC_Minutes / 60);
RTC_Days = RTC_Hours / 24;
HWREGBITW(&g_ui32PrintFlags, 0) = 1;
/*//
// Use the flags to Toggle the LED for this timer
//
GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, g_ui32Flags);*/
//
// Update the interrupt status.
//
}
开发者ID:keithlueneburg,项目名称:TCES430-projects,代码行数:33,代码来源:timers.c
示例4: Timer0AIntHandler
void Timer0AIntHandler(void)
{
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
led_value ^= LED_BLUE;
ROM_GPIOPinWrite(GPIO_PORTF_BASE, LED_BLUE, led_value);
}
开发者ID:kevinporetti,项目名称:embedded-software-s16,代码行数:7,代码来源:main_timer_interrupt.c
示例5: Timer4IntHandler
//*****************************************************************************
//
// The interrupt handler for timer 4. This will be called whenever the timer
// count reaches the match value (0 in this example).
//
// TODO: Make sure you hook your ISR to the correct vector in the application
// startup file.
//
//*****************************************************************************
void
Timer4IntHandler(void)
{
//
// Clear the timer interrupt.
//
// TODO: Rework this for the timer you are using in your application.
//
ROM_TimerIntClear(TIMER4_BASE, TIMER_CAPA_MATCH);
//
// TODO: Do whatever your application needs to do when the relevant
// number of edges have been counted.
//
ProcessInterrupt();
//
// The timer is automatically stopped when it reaches the match value
// so re-enable it here.
//
// TODO: Whether you reenable the timer here or elsewhere will be up to
// your particular application.
//
ROM_TimerEnable(TIMER4_BASE, TIMER_A);
}
开发者ID:peterliu2,项目名称:tivaWare,代码行数:34,代码来源:edge_count.c
示例6: Timer0ISR
///
/// routine di servizio del timer0
void Timer0ISR(void){
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
//
// Toggle the flag for the first timer.
//
///HWREGBITW(&g_ui32Flags, 0) ^= 1;
//PIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_2, GPIO_PIN_2);
procCom = 1;
tick++;
//
// Use the flags to Toggle the LED for this timer
//
//GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, g_ui32Flags << 1);
//
// Update the interrupt status on the display.
//
}
开发者ID:itismattei,项目名称:controlPid,代码行数:27,代码来源:tiva_timer.c
示例7: Timer0IntHandler
void Timer0IntHandler(void){
// Used to countdown from entered time
// Clear the timer interrupt.
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
// Check if time has been reached
if(g_countdownTime == 0){
ROM_IntMasterDisable();
UARTprintf("Time's Up!\n\n");
ROM_IntMasterEnable();
ROM_TimerEnable(TIMER1_BASE, TIMER_A);
ROM_TimerIntDisable(TIMER0_BASE, TIMER_A);
return;
}
// Turn on LED
ROM_GPIOPinWrite(GPIO_PORTF_BASE, LED_RED, LED_RED);
ROM_TimerEnable(TIMER2_BASE, TIMER_A);
// Update the interrupt status on the display.
ROM_IntMasterDisable();
UARTprintf(" %i\n",g_countdownTime);
ROM_IntMasterEnable();
// Decrement counter
g_countdownTime--;
// Turn off LED
//ROM_GPIOPinWrite(GPIO_PORTF_BASE, LED_RED, 0);
}
开发者ID:chaitanya4b3,项目名称:Tiva-Test,代码行数:31,代码来源:timers.c
示例8: RGBBlinkIntHandler
//*****************************************************************************
//
//! Wide Timer interrupt to handle blinking effect of the RGB
//!
//! This function is called by the hardware interrupt controller on a timeout
//! of the wide timer. This function must be in the NVIC table in the startup
//! file. When called will toggle the enable flag to turn on or off the entire
//! RGB unit. This creates a blinking effect. A wide timer is used since the
//! blink is intended to be visible to the human eye and thus is expected to
//! have a frequency between 15 and 0.1 hz. Currently blink duty is fixed at
//! 50%.
//!
//! \return None.
//
//*****************************************************************************
void
RGBBlinkIntHandler(void)
{
static unsigned long ulFlags;
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(WTIMER5_BASE, TIMER_TIMB_TIMEOUT);
//
// Toggle the flag for the blink timer.
//
ulFlags ^= 1;
if(ulFlags)
{
RGBEnable();
}
else
{
RGBDisable();
}
}
开发者ID:AlexGeControl,项目名称:tiva-c,代码行数:41,代码来源:rgb.c
示例9: Mode_WTimer3BISR
void Mode_WTimer3BISR(void){
ROM_TimerIntClear(WTIMER3_BASE, TIMER_CAPB_EVENT);
// Doc trang thai canh ngat
if (GPIOPinRead(GPIO_PORTD_BASE,GPIO_PIN_3)&GPIO_PIN_3)
ui32T_Edgeup_Mode = ROM_TimerValueGet(WTIMER3_BASE, TIMER_B);
else
{
if (firstEdgeMode)
{
firstEdgeMode=0;
return;
}
ui32T_Edgedown_Mode = ROM_TimerValueGet(WTIMER3_BASE, TIMER_B);
i32DeltaT_Mode = (int32_t)(ui32T_Edgedown_Mode - ui32T_Edgeup_Mode);
// UARTPutn(UART0_BASE,i32DeltaT_SStop);
// UARTCharPut(UART0_BASE,'\n');
// if ((i32DeltaT_Mode<125000) && (i32DeltaT_Mode>115000))
// isAuto=true;
// else if ((i32DeltaT_Mode>135000) && (i32DeltaT_Mode<145000))
// isAuto=false;
}
}
开发者ID:ndhuan,项目名称:AutomaticSprayingMachine,代码行数:26,代码来源:InterruptHandler.c
示例10: Timer0IntHandler
//*****************************************************************************
//
// The interrupt handler for the periodic timer interrupt. When the uDMA
// channel is used, interrupts from the periodic timer are used as DMA
// requests, and this interrupt handler is invoked only at the end of all of
// the DMA transfers.
//
//*****************************************************************************
void
Timer0IntHandler(void)
{
unsigned long ulStatus;
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
//
// Read the uDMA channel status to verify it is done
//
ulStatus = uDMAChannelModeGet(UDMA_CHANNEL_TMR0A);
if(ulStatus == UDMA_MODE_STOP)
{
//
// Disable the periodic timer and set the done flag
//
ROM_TimerDisable(TIMER0_BASE, TIMER_A);
g_bDoneFlag = 1;
}
//
// Increment a counter to indicate the number of times this handler
// was invoked
//
g_ulTimer0AIntCount++;
}
开发者ID:yangjunjiao,项目名称:Luminary-Micro-Library,代码行数:37,代码来源:udma_timer.c
示例11: Timer0IntHandler
//*****************************************************************************
//
// The interrupt handler for the first timer interrupt.
//
//*****************************************************************************
void
Timer0IntHandler(void)
{
char cOne, cTwo;
//
// Clear the timer interrupt.
//
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT);
//
// Toggle the flag for the first timer.
//
HWREGBITW(&g_ui32Flags, 0) ^= 1;
//
// Use the flags to Toggle the LED for this timer
//
GPIOPinWrite(GPIO_PORTF_BASE, GPIO_PIN_1, g_ui32Flags << 1);
//
// Update the interrupt status on the display.
//
ROM_IntMasterDisable();
cOne = HWREGBITW(&g_ui32Flags, 0) ? '1' : '0';
cTwo = HWREGBITW(&g_ui32Flags, 1) ? '1' : '0';
UARTprintf("\rT1: %c T2: %c", cOne, cTwo);
ROM_IntMasterEnable();
}
开发者ID:PhamVanNhi,项目名称:ECE5770,代码行数:34,代码来源:timers.c
示例12: TimerIntHandlerServos
// Triggered every SERVO_TIMER_RESOLUTION microseconds
void TimerIntHandlerServos(void) {
// Clear the interrupt
ROM_TimerIntClear(SERVO_TIMER, SERVO_TIMER_TRIGGER);
// SERVO_TIMER_RESOLUTION microseconds have passed, increment each counter by that
// to determine how long to set the pin high for
g_pulseTime += SERVO_TIMER_RESOLUTION;
if(g_pulseTime > SERVO_PERIOD) {
g_pulseTime = 0;
}
// Loop through al servo configs and see if they need to be set low yet
uint8_t i;
for(i=0; i<SERVO_MAX_COUNT; i++) {
servo_t *servo = &g_servos[i];
if(servo->state & SERVO_STATE_ENABLED) {
if(g_pulseTime >= servo->value) {
// End of pulse, set low
ROM_GPIOPinWrite(servo->port, servo->pin, 0);
} else {
// Beginning of pulse, set high
ROM_GPIOPinWrite(servo->port, servo->pin, servo->pin);
}
}
}
}
开发者ID:mattwilliamson,项目名称:stellaris-launchpad-servo,代码行数:29,代码来源:servo.c
示例13: ROM_TimerIntClear
void ServoClass::ServoIntHandler(void)
{
// Clear the timer interrupt.
ROM_TimerIntClear(SERVO_TIMER, SERVO_TIMER_TRIGGER);
// Get the pulse width value for the current servo from the array
// if we have already serviced all servos (g_iServoNo = MAX_SERVO_NO)
// then this value should be the 20ms period value
unsigned long l_ulPulseWidth = g_ulTicksPerMicrosecond * g_ulServoPulse[g_iServoNo];
// Re-Load the timer with the new pulse width count value
ROM_TimerLoadSet(SERVO_TIMER, SERVO_TIMER_A, l_ulPulseWidth);
// End the servo pulse set previously (if any)
if(g_iServoNo > 0) // If not the 1st Servo....
{
if (g_ulServoPins[g_iServoNo - 1] != INVALID_SERVO_PIN)
digitalWrite(g_ulServoPins[g_iServoNo - 1], LOW);
}
// Set the current servo pin HIGH
if(g_iServoNo < SERVOS_PER_TIMER)
{
if (g_ulServoPins[g_iServoNo] != INVALID_SERVO_PIN)
digitalWrite(g_ulServoPins[g_iServoNo], HIGH);
g_iServoNo++; // Advance to next servo for processing next time
}
else
{
g_iServoNo = 0; // Start all over again
}
}
开发者ID:Ryccoo,项目名称:quad_libraries,代码行数:32,代码来源:Servo.cpp
示例14: stagInterrupt
void stagInterrupt(void)
{
g_stag.moveLegs();
float a, b, c;
for (int i = 0; i < 4; i++)
{
g_stag.getLeg(i, &a, &b, &c);
/*
puts("Leg ");
puti(i+1);
puts(" Value1: ");
puti(servoPulseOffset[i*3] + a*angleToPulseFactor);
puts(" Value2: ");
puti(servoPulseOffset[i*3 + 1] + b*angleToPulseFactor);
puts(" Value3: ");
puti(servoPulseOffset[i*3 + 2] + c*angleToPulseFactor);
putln();
*/
servoWrite(legPins[i*3], servoPulseOffset[i*3] + a*angleToPulseFactor);
servoWrite(legPins[i*3 + 1], servoPulseOffset[i*3 + 1] + b*angleToPulseFactor);
servoWrite(legPins[i*3 + 2], servoPulseOffset[i*3 + 2] + c*angleToPulseFactor);
}
//putln();
// Sensor feeds are sent from here
ROM_TimerIntClear(WTIMER0_BASE, TIMER_TIMA_TIMEOUT);
}
开发者ID:hashbangproject,项目名称:Hashbot,代码行数:33,代码来源:main.cpp
示例15: SStop_WTimer2AISR
void SStop_WTimer2AISR(void){
ROM_TimerIntClear(WTIMER2_BASE, TIMER_CAPA_EVENT);
// Doc trang thai canh ngat
if (GPIOPinRead(GPIO_PORTD_BASE,GPIO_PIN_0)&GPIO_PIN_0)
ui32T_Edgeup_SStop = ROM_TimerValueGet(WTIMER2_BASE, TIMER_A);
else
{
if (firstEdgeSStop)
{
firstEdgeSStop=0;
return;
}
ui32T_Edgedown_SStop = ROM_TimerValueGet(WTIMER2_BASE, TIMER_A);
i32DeltaT_SStop = (int32_t)(ui32T_Edgedown_SStop - ui32T_Edgeup_SStop);
// UARTPutn(UART0_BASE,i32DeltaT_SStop);
// UARTCharPut(UART0_BASE,'\n');
if ((i32DeltaT_SStop<125000) && (i32DeltaT_SStop>115000))
SSTOP_STOP;
else if ((i32DeltaT_SStop>135000) && (i32DeltaT_SStop<145000) && isRunning)
//both RF receiver and PC gui must start
SSTOP_START;
}
}
开发者ID:ndhuan,项目名称:AutomaticSprayingMachine,代码行数:29,代码来源:InterruptHandler.c
示例16: Timer1IntHandler
void Timer1IntHandler(void)
{
//debugled(10);
ROM_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
//debugled(3);
int angle=0;
if(max2>0 && max1>0 && abs(maxi1-maxi2)<PULSE_SAMPLE)
{
//float dt=abs(maxi1-maxi2)/SAMPLING_FREQUENCY;
//angle=asin(dt*lambda/distance)*180/3.1412;
angle=abs(maxi1-maxi2);
}
//debugled(3);
acount++;
//rcount=0;
//ROM_IntMasterDisable();
snprintf(text,sizeof(text),"%3ld,%3ld",rcount,g_ulADCCount);
GrContextForegroundSet(&sDisplayContext, ClrDarkBlue);
GrRectFill(&sDisplayContext, &sRect1);
GrContextForegroundSet(&sDisplayContext, ClrWhite);
//GrRectDraw(&sDisplayContext, &sRect1);
GrContextFontSet(&sDisplayContext, g_pFontCm12);
GrStringDrawCentered(&sDisplayContext,text, -1,
GrContextDpyWidthGet(&sDisplayContext) / 2, 10, 0);
GrContextForegroundSet(&sDisplayContext, ClrDarkBlue);
GrRectFill(&sDisplayContext, &sRect2);
GrContextForegroundSet(&sDisplayContext, ClrWhite);
sprintf(text,"%4d,%4d",buffer_increment,rem);
GrContextFontSet(&sDisplayContext, g_pFontCm12/*g_pFontFixed6x8*/);
GrStringDrawCentered(&sDisplayContext, text, -1,
GrContextDpyWidthGet(&sDisplayContext) / 2,
((GrContextDpyHeightGet(&sDisplayContext) - 24) / 2) + 24,
0);
// GrFlush(&sDisplayContext);
max1=0;
max2=0;
res=0;
res1=0;
maxi1=0;
maxi2=0;
buffer_index=0;
for(i=0;i<buffer_size;i++)
{
buffer[0][i]=0;
buffer[1][i]=0;
}
i=0;
j=0;
ind2=buffer_index-buffer_increment+1;
}
开发者ID:pi19404,项目名称:Embedded,代码行数:59,代码来源:acquire.c
示例17: Timer1A_Interrupt_Handler
void Timer1A_Interrupt_Handler(void){
// Clear the timer interrupt.
ROM_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
// Spin the Clock Face
LCD_Clock();
}
开发者ID:cdnagy,项目名称:MCUFUN,代码行数:8,代码来源:timer1.c
示例18: stop_Timer0B
void stop_Timer0B(void)
{
ROM_IntDisable(INT_TIMER0B);
ROM_TimerIntDisable(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMB_TIMEOUT);
}
开发者ID:imfgz,项目名称:fgz_quadcopter,代码行数:8,代码来源:My_PeriodTimer.c
示例19: Timer2IntHandler
/** ISR for Timer 2
* @pre timer configured with initTimer
* @pre global interrupts enabled with HAL_ENABLE_INTERRUPTS()
*/
void Timer2IntHandler(void)
{
// Clear the timer interrupt
ROM_TimerIntClear(TIMER2_BASE, TIMER_TIMA_TIMEOUT);
// Call the timerIsr function pointer
timerIsr();
}
开发者ID:vtoanb,项目名称:msp430lioamaintain,代码行数:12,代码来源:hal_ek-lm4f120XL.c
示例20: Timer0AIntHandler
//定时器0A周期中断服务函数
void Timer0AIntHandler(void)
{
static uint8_t i = 0;
ROM_TimerIntClear(TIMER0_BASE, TIMER_TIMA_TIMEOUT); //清除定时器中断标志
Get_Attitude();//读取MPU6050得到姿态角
if (Pitch > 45 || Pitch < -45) //俯仰角限幅
{
g_stop_fly = 1; //停止
}
if (Roll > 45 || Roll < -45) //横滚角限幅
{
g_stop_fly = 1;
}
X_MODE_Control(); //PID控制
if (g_start == 0)
{
//输出值最大值限幅
if (X_OUT1 > 5000) X_OUT1 = 5000;
else if (X_OUT1 < 2620) X_OUT1 = 2620;
if (X_OUT2 > 5000) X_OUT2 = 5000;
else if (X_OUT2 < 2620) X_OUT2 = 2620;
if (X_OUT3 > 5000) X_OUT3 = 5000;
else if (X_OUT3 < 2620) X_OUT3 = 2620;
if (X_OUT4 > 5000) X_OUT4 = 5000;
else if (X_OUT4 < 2620) X_OUT4 = 2620;
}
PWM_WidthSet(X_OUT1, X_OUT2, X_OUT3, X_OUT4);//PWM输出,电机控制
ui32Counter++; //更新周期中断计数
if (ui32Counter == NUMBER_OF_INTS) //1s闪灯标志
{
g_1s_flag = 1;
if (i == 0)
{
i = 1;
ui32Counter = 0;
LED_off;
}
else
{
i = 0;
ui32Counter = 0;
LED_on;
}
}
}
开发者ID:younghonor,项目名称:2016,代码行数:57,代码来源:ti_Timer.c
注:本文中的ROM_TimerIntClear函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论