mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2025-12-10 07:14:36 +01:00
parent
19d5f4c0d7
commit
eba6adb4e1
1 changed files with 3 additions and 4 deletions
|
|
@ -105,7 +105,7 @@ extern "C" {
|
|||
#ifndef TIMER_ALARM_IRQ_NUM
|
||||
#if NUM_GENERIC_TIMERS == 1
|
||||
static_assert(TIMER_IRQ_3 == TIMER_IRQ_0 + 3, "");
|
||||
#define TIMER_ALARM_IRQ_NUM(timer, alarm_num) (TIMER_IRQ_0 + (alarm_num))
|
||||
#define TIMER_ALARM_IRQ_NUM(timer, alarm_num) ({ ((void)(timer)); (TIMER_IRQ_0 + (alarm_num)); })
|
||||
#else
|
||||
static_assert(TIMER1_IRQ_3 == TIMER0_IRQ_0 + 7, "");
|
||||
#define TIMER_ALARM_IRQ_NUM(timer, alarm_num) (TIMER0_IRQ_0 + TIMER_NUM(timer) * NUM_ALARMS + (alarm_num))
|
||||
|
|
@ -554,7 +554,7 @@ void hardware_alarm_force_irq(uint alarm_num);
|
|||
* \param alarm_num the alarm number
|
||||
* \sa TIMER_ALARM_IRQ_NUM
|
||||
*/
|
||||
static inline uint timer_hardware_alarm_get_irq_num(__unused timer_hw_t *timer, uint alarm_num) {
|
||||
static inline uint timer_hardware_alarm_get_irq_num(timer_hw_t *timer, uint alarm_num) {
|
||||
check_hardware_alarm_num_param(alarm_num);
|
||||
return TIMER_ALARM_IRQ_NUM(timer, alarm_num);
|
||||
}
|
||||
|
|
@ -562,10 +562,9 @@ static inline uint timer_hardware_alarm_get_irq_num(__unused timer_hw_t *timer,
|
|||
/**
|
||||
* \ingroup hardware_timer
|
||||
* \brief Returns the \ref irq_num_t for the alarm interrupt from the given alarm on the default timer instance
|
||||
* \param timer the timer instance
|
||||
* \param alarm_num the alarm number
|
||||
*/
|
||||
static inline uint hardware_alarm_get_irq_num(timer_hw_t *timer, uint alarm_num) {
|
||||
static inline uint hardware_alarm_get_irq_num(uint alarm_num) {
|
||||
return timer_hardware_alarm_get_irq_num(PICO_DEFAULT_TIMER_INSTANCE(), alarm_num);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue