示例#1
0
interrupt_attr
void rtc_irq_handler(void)
{
	LED4 ^= 1;
	tn_tick_int_processing();
	tn_int_exit();
}
示例#2
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
void DMA1_Stream3_IRQHandler (void)  //-- UART3 Tx
{
    //-- Clear int flag
    DMA_ClearFlag(DMA1_Stream3, DMA_FLAG_TCIF3);

    tn_int_exit();
}
示例#3
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
void DMA2_Stream7_IRQHandler(void)  //-- UART1 Tx
{
    //	tn_event_iset(&event_all_uart, EVENT_UART3_TX_END);
    //-- Clear int flag
    DMA_ClearFlag(DMA2_Stream7, DMA_FLAG_TCIF6);


    tn_int_exit();
}
示例#4
0
/*----------------------------------------------------------------------------*/
void hw_portA_int_handler()
{
    unsigned char mask = GPIOPinIntStatus(GPIO_PORTA_BASE, NULL);
    if (mask & GPIO_PIN_7)
    {
        MAP_GPIOPinIntClear(GPIO_PORTA_BASE, GPIO_PIN_7 );
        DS1390_int_handler();
    }
    tn_int_exit();
}
示例#5
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
void DMA2_Stream5_IRQHandler(void)  //-- UART1 Rx
{
    //--- Reload DMA - urgent
    DMA_ClearFlag(DMA2_Stream5, DMA_FLAG_TCIF5);
#ifdef USE_USART1
    DMA_Cmd(DMA2_Stream5, DISABLE);
    DMA_SetCurrDataCounter(DMA2_Stream5, USART1_RX_BUF_SIZE);
    DMA_Cmd(DMA2_Stream5, ENABLE);
#endif
    tn_int_exit();
}
示例#6
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
void DMA1_Stream1_IRQHandler(void)  //-- UART3 Rx
{
    //--- Reload DMA - urgent
    DMA_ClearFlag(DMA1_Stream1, DMA_FLAG_TCIF1);
#ifdef USE_USART3
    DMA_Cmd(DMA1_Stream1, DISABLE);
    DMA_SetCurrDataCounter(DMA1_Stream1, USART3_RX_BUF_SIZE);
    DMA_Cmd(DMA1_Stream1, ENABLE);
#endif
    tn_int_exit();
}
示例#7
0
文件: tn_user.c 项目: alepnm/lcd
void USART2_IRQHandler(void)  //-- UART2 Tx Complite
{
    if(USART_GetITStatus(USART2, USART_IT_TC) != RESET)
    {
        USART_ClearITPendingBit(USART2, USART_IT_TC);
#ifdef USE_USART2_RS485
        USART2_DE_485_OFF();
        USART2->CR1 |= USART_Mode_Rx;
#endif
    }
    tn_int_exit();
}
示例#8
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
// прерывание от 1ms - системный тик
void SysTick_Handler(void)
{
    tn_tick_int_processing();
    tn_calc_performance();
    timer1ms++;
    if (counter1000ms++ >= 999)
    {
        counter1000ms = 0;
        timer1s++;
    }
    tn_int_exit();
}
示例#9
0
/*----------------------------------------------------------------------------*/
void hw_portJ_int_handler()
{
    /*
     unsigned char mask = GPIOPinIntStatus(GPIO_PORTJ_BASE, NULL);
    if (mask & GPIO_PIN_7)
    {
        MAP_GPIOPinIntClear(GPIO_PORTA_BASE, GPIO_PIN_7 );
        //DS1390_int_handler();
    }
    */
    IntGPIO_U();
    tn_int_exit();
}
示例#10
0
void tn_sys_tick_int_handler()
{
    tn_tick_int_processing();

    ++g_sys_ticks;

    if (g_sys_ticks % TN_SYS_TICK_FQ_HZ == 0)
        hw_unix_time_int_handler();

    if (g_sys_ticks % ETH_TIMER_EVENT_TICKS == 0)
        lwip_timer_event_iset();

    tn_int_exit();
}
示例#11
0
/*----------------------------------------------------------------------------*/
void hw_portC_int_handler()
{
    unsigned char mask = GPIOPinIntStatus(GPIO_PORTC_BASE, NULL);

    if (mask & GPIO_PIN_4)
    {
    MAP_GPIOPinIntClear(GPIO_PORTC_BASE, GPIO_PIN_4 );
    }
    if (mask & GPIO_PIN_5)
    {
    MAP_GPIOPinIntClear(GPIO_PORTC_BASE, GPIO_PIN_5 );
    }
    tn_int_exit();
}
示例#12
0
文件: tn_user.c 项目: alepnm/lcd
//----------------------------------------------------------------------------
static void tn_calc_performance(void)
{
    static int cnt = 0;

    cnt++;
    if(cnt == 1000)  //-- 1 s
    {
        cnt = 0;

        tn_curr_performance = tn_idle_count;
        tn_idle_count = 0;

        //tn_sem_isignal(&semMeasPrf);  //-- To send result to the host
    }
    tn_int_exit();
}
示例#13
0
/*----------------------------------------------------------------------------*/
void hw_USB0DeviceIntHandler()
{
    //lwip_eth_int_processing();
//    USB0DeviceIntHandler();
    tn_int_exit();
}
示例#14
0
/*----------------------------------------------------------------------------*/
void hw_timer1a_int_handler()
{
    MAP_TimerIntClear(TIMER1_BASE, TIMER_TIMA_TIMEOUT);
    tn_event_iset(g_timer1a_evt, g_timer1a_evt_pattern);
    tn_int_exit();
}
示例#15
0
/*----------------------------------------------------------------------------*/
void hw_adc_seq0_int_handler()
{
    adc_seq0_int_handler();
    tn_int_exit();
}
示例#16
0
/*----------------------------------------------------------------------------*/
void hw_adc_seq1_int_handler()
{
    adc_trigg++;
    adc0_seq1_int_handler();
    tn_int_exit();
}
示例#17
0
/*----------------------------------------------------------------------------*/
void hw_uart1_int_handler()
{
    uart1_int_handler();
    tn_int_exit();
}
示例#18
0
/* interrupts ----------------------------------------------------------------*/
void hw_ethernet_int_handler()
{
    lwip_eth_int_processing();
    tn_int_exit();
}
示例#19
0
/*----------------------------------------------------------------------------*/
void hw_uart2_int_handler()
{
//    uart2_int_handler();
    tn_int_exit();
}
示例#20
0
文件: beeper.c 项目: alepnm/lcd
void TIM1_BRK_TIM9_IRQHandler(void)  //-- UART2 Tx
{
	//	tn_event_iset(&event_all_uart, EVENT_UART3_TX_END);
	//-- Clear int flag
	/* TIM9_CH2 toggling with frequency = 366.2 Hz */
	if (TIM_GetITStatus(TIM9, TIM_IT_Update) != RESET)
	{
		TIM_ClearITPendingBit(TIM9, TIM_IT_Update);
	}

	if (beep.intSoundOn || beep.shortSoundOn)
	{
		GPIO_ToggleBits  ( GPIOC, GPIO_Pin_13);
	}
	else
	{
		GPIO_ResetBits  ( GPIOC, GPIO_Pin_13);
	}

	if (beep.shortSoundOn)
	{
		if (beep.ShortDownCounter--)
		{

		}
		else
		{
			beep.shortSoundOn = 0;
		}
	}

	if (beep.intSoundEnable)
	{
		if (beep.intSoundCounter)
		{
			beep.intSoundCounter--;
			beep.intSoundOn = 1;
			beep.intPauseCounter = 2000;
		}
		else
		{
			if (beep.intPauseCounter)
			{
				beep.intPauseCounter--;
				beep.intSoundOn = 0;
			}
			else
			{
				beep.intSoundCounter = 2000;
			}
		}

	}
	else
	{
		beep.intSoundOn = 0;
	}




#ifdef TNKERNEL_PORT_CORTEXM3
	tn_int_exit();
#endif
}
示例#21
0
/*----------------------------------------------------------------------------*/
void hw_portH_int_handler()
{
    IntGPIO_PW_CONTR();
    tn_int_exit();
}