1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/pkg/mynewt-core/contrib/nrf5x_isr.c
2021-08-13 19:50:38 +02:00

56 lines
962 B
C

/*
* Copyright (C) 2021 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup pkg_mynewt_core
* @{
*
* @file
* @brief mynewt-core isr mapping
*
* @author Hauke Petersen <hauke.petersen@fu-berlin.de>
* @}
*/
#include "mcu/mcu.h"
#include "cpu.h"
static void (*radio_isr_addr)(void);
static void (*rng_isr_addr)(void);
static void (*rtc0_isr_addr)(void);
void isr_radio(void)
{
radio_isr_addr();
}
void isr_rng(void)
{
rng_isr_addr();
}
void isr_rtc0(void)
{
rtc0_isr_addr();
}
void nrf5x_hw_set_isr(int irqn, void (*addr)(void))
{
switch (irqn) {
case RADIO_IRQn:
radio_isr_addr = addr;
break;
case RNG_IRQn:
rng_isr_addr = addr;
break;
case RTC0_IRQn:
rtc0_isr_addr = addr;
break;
}
}