mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 09:58:28 -04:00
AP_HAL_VRBrain: attach_interrupt now takes a functor
AP_HAL_VRBRAIN: add type-safety for interrupt types
This commit is contained in:
parent
8d5a9ead48
commit
a7b79f7693
@ -173,7 +173,9 @@ AP_HAL::DigitalSource* VRBRAINGPIO::channel(uint16_t n) {
|
||||
}
|
||||
|
||||
/* Interrupt interface: */
|
||||
bool VRBRAINGPIO::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p, uint8_t mode)
|
||||
bool VRBRAINGPIO::attach_interrupt(uint8_t interrupt_num,
|
||||
irq_handler_fn_t fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -31,7 +31,9 @@ public:
|
||||
AP_HAL::DigitalSource* channel(uint16_t n) override;
|
||||
|
||||
/* Interrupt interface: */
|
||||
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 fn,
|
||||
INTERRUPT_TRIGGER_TYPE mode) override;
|
||||
|
||||
/* return true if USB cable is connected */
|
||||
bool usb_connected(void) override;
|
||||
|
Loading…
Reference in New Issue
Block a user