Exemplo n.º 1
0
//void SysTick_Handler( void );
//void POWER_CLOCK_IRQHandler( void );
//void RADIO_IRQHandler( void );
//void UART0_IRQHandler( void );
//void SPI0_TWI0_IRQHandler( void );
//void SPI1_TWI1_IRQHandler( void );
//void GPIOTE_IRQHandler( void );
//void ADC_IRQHandler( void );
void TIMER0_IRQHandler( void )
{
  if(TIMER_EvenCheck(TIMERx, TIMERx_CH) == SUCCESS) {
    LED1_Toggle();
    TIMER_EvenClear(TIMERx, TIMERx_CH);
    TIMER_TimerClear(TIMERx);
  }
}
Exemplo n.º 2
0
int main( void )
{
  System_Init();

  while(1) {
    LED1_Toggle();
    delay_ms(100);

    printf("ADC = %d\r\n", SAADC_Read(ADCx_CHANNEL));
  }
}
Exemplo n.º 3
0
//void SysTick_Handler( void );
//void POWER_CLOCK_IRQHandler( void );
//void RADIO_IRQHandler( void );
//void UART0_IRQHandler( void );
//void SPI0_TWI0_IRQHandler( void );
//void SPI1_TWI1_IRQHandler( void );
//void GPIOTE_IRQHandler( void );
//void ADC_IRQHandler( void );
//void TIMER0_IRQHandler( void );
//void TIMER1_IRQHandler( void );
//void TIMER2_IRQHandler( void );
void RTC0_IRQHandler( void )
{
  if(RTC_TickEvenCheck(RTCx) == SUCCESS) {
    LED1_Toggle();
    RTC_TickEvenClear(RTCx);
  }
  if(RTC_CompEvenCheck(RTCx, RTCx_CH) == SUCCESS) {
    LED2_Toggle();
    RTC_CompEvenClear(RTCx, RTCx_CH);
    RTC_CntClear(RTCx);
  }
}
Exemplo n.º 4
0
/** @brief: Function for handling the RTC0 interrupts.
 * Triggered on TICK and COMPARE0 match.
 */
void RTC0_IRQHandler()
{
    if ((NRF_RTC0->EVENTS_TICK != 0) && 
        ((NRF_RTC0->INTENSET & RTC_INTENSET_TICK_Msk) != 0))
    {
        NRF_RTC0->EVENTS_TICK = 0;
        LED1_Toggle();
    }
    
    if ((NRF_RTC0->EVENTS_COMPARE[0] != 0) && 
        ((NRF_RTC0->INTENSET & RTC_INTENSET_COMPARE0_Msk) != 0))
    {
        NRF_RTC0->EVENTS_COMPARE[0] = 0;
        LED2_Toggle();
    }
}