AP_HAL_Linux: attach_interrupt now takes a functor
AP_HAL_Linux: add type-safety for interrupt types
This commit is contained in:
parent
4767666a2d
commit
8d5a9ead48
@ -113,7 +113,9 @@ AP_HAL::DigitalSource* GPIO_BBB::channel(uint16_t n) {
|
||||
}
|
||||
|
||||
/* Interrupt interface: */
|
||||
bool GPIO_BBB::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p, uint8_t mode)
|
||||
bool GPIO_BBB::attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -130,8 +130,9 @@ public:
|
||||
AP_HAL::DigitalSource* channel(uint16_t n);
|
||||
|
||||
/* Interrupt interface: */
|
||||
bool attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
|
||||
uint8_t mode);
|
||||
bool attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode) override;
|
||||
|
||||
/* return true if USB cable is connected */
|
||||
bool usb_connected(void);
|
||||
|
@ -122,7 +122,9 @@ AP_HAL::DigitalSource* GPIO_RPI::channel(uint16_t n)
|
||||
}
|
||||
|
||||
/* Interrupt interface: */
|
||||
bool GPIO_RPI::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p, uint8_t mode)
|
||||
bool GPIO_RPI::attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -57,8 +57,9 @@ public:
|
||||
AP_HAL::DigitalSource* channel(uint16_t n);
|
||||
|
||||
/* Interrupt interface: */
|
||||
bool attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
|
||||
uint8_t mode);
|
||||
bool attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode);
|
||||
|
||||
/* return true if USB cable is connected */
|
||||
bool usb_connected(void);
|
||||
|
@ -188,8 +188,9 @@ AP_HAL::DigitalSource* GPIO_Sysfs::channel(uint16_t vpin)
|
||||
return new DigitalSource_Sysfs(pin, value_fd);
|
||||
}
|
||||
|
||||
bool GPIO_Sysfs::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
|
||||
uint8_t mode)
|
||||
bool GPIO_Sysfs::attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t p,
|
||||
INTERRUPT_TRIGGER_TYPE mode)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -52,7 +52,9 @@ public:
|
||||
/*
|
||||
* Currently this function always returns false.
|
||||
*/
|
||||
bool attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p, uint8_t mode) override;
|
||||
bool attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t p,
|
||||
INTERRUPT_TRIGGER_TYPE mode) override;
|
||||
|
||||
/*
|
||||
* Currently this function always returns false.
|
||||
|
Loading…
Reference in New Issue
Block a user