mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_HAL_SITL: attach_interrupt now takes a functor
AP_HAL_SITL: add type-safety for interrupt types
This commit is contained in:
parent
a7b79f7693
commit
5180e025bb
@ -53,8 +53,10 @@ AP_HAL::DigitalSource* GPIO::channel(uint16_t n) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Interrupt interface: */
|
/* Interrupt interface: */
|
||||||
bool GPIO::attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
|
bool GPIO::attach_interrupt(uint8_t interrupt_num,
|
||||||
uint8_t mode) {
|
irq_handler_fn_t fn,
|
||||||
|
INTERRUPT_TRIGGER_TYPE mode)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@ public:
|
|||||||
AP_HAL::DigitalSource* channel(uint16_t n);
|
AP_HAL::DigitalSource* channel(uint16_t n);
|
||||||
|
|
||||||
/* Interrupt interface: */
|
/* Interrupt interface: */
|
||||||
bool attach_interrupt(uint8_t interrupt_num, AP_HAL::Proc p,
|
bool attach_interrupt(uint8_t interrupt_num,
|
||||||
uint8_t mode);
|
irq_handler_fn_t fn,
|
||||||
|
INTERRUPT_TRIGGER_TYPE mode) override;
|
||||||
|
|
||||||
/* return true if USB cable is connected */
|
/* return true if USB cable is connected */
|
||||||
bool usb_connected(void);
|
bool usb_connected(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user