2012-08-27 15:45:42 -03:00
|
|
|
|
|
|
|
|
|
|
|
#ifndef __AP_HAL_AVR_ISR_REGISTRY_H__
|
|
|
|
#define __AP_HAL_AVR_ISR_REGISTRY_H__
|
|
|
|
|
2015-08-11 03:28:43 -03:00
|
|
|
#include <AP_HAL/AP_HAL.h>
|
|
|
|
#include <AP_HAL_AVR/AP_HAL_AVR_Namespace.h>
|
2012-08-27 15:45:42 -03:00
|
|
|
|
|
|
|
#define ISR_REGISTRY_TIMER2_OVF 0
|
|
|
|
#define ISR_REGISTRY_TIMER4_CAPT 1
|
|
|
|
#define ISR_REGISTRY_TIMER5_CAPT 2
|
|
|
|
#define ISR_REGISTRY_NUM_SLOTS 3
|
|
|
|
|
|
|
|
class AP_HAL_AVR::ISRRegistry {
|
|
|
|
public:
|
2012-09-07 15:42:51 -03:00
|
|
|
int register_signal(int isr_number, AP_HAL::Proc proc);
|
2012-08-27 15:45:42 -03:00
|
|
|
int unregister_signal(int isr_number);
|
|
|
|
|
2012-09-07 15:42:51 -03:00
|
|
|
static AP_HAL::Proc _registry[ISR_REGISTRY_NUM_SLOTS];
|
2012-08-27 15:45:42 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AP_HAL_AVR_ISR_REGISTRY_H__
|