mirror of
https://github.com/eclipse/upm.git
synced 2025-03-14 20:47:30 +03:00
hcsr04: fix compilation issue with maa_gpio_isr args
Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
parent
b1e548ae8a
commit
2fa9b7b6c9
@ -43,7 +43,7 @@ sig_handler(int signo)
|
||||
|
||||
//! [Interesting]
|
||||
void
|
||||
interrupt (void) {
|
||||
interrupt (void * args) {
|
||||
sonar->ackEdgeDetected ();
|
||||
}
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
using namespace upm;
|
||||
|
||||
HCSR04::HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void)) {
|
||||
HCSR04::HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void *)) {
|
||||
maa_result_t error = MAA_SUCCESS;
|
||||
m_name = "HCSR04";
|
||||
|
||||
@ -50,7 +50,7 @@ HCSR04::HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void)) {
|
||||
|
||||
maa_gpio_dir(m_echoPinCtx, MAA_GPIO_IN);
|
||||
gpio_edge_t edge = MAA_GPIO_EDGE_BOTH;
|
||||
maa_gpio_isr (m_echoPinCtx, edge, fptr);
|
||||
maa_gpio_isr (m_echoPinCtx, edge, fptr, NULL);
|
||||
}
|
||||
|
||||
HCSR04::~HCSR04 () {
|
||||
|
@ -55,7 +55,7 @@ class HCSR04 {
|
||||
* @param fptr function pointer for handling raising and
|
||||
* falling interrupts
|
||||
*/
|
||||
HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void));
|
||||
HCSR04 (uint8_t triggerPin, uint8_t echoPin, void (*fptr)(void *));
|
||||
|
||||
/**
|
||||
* HCSR04 object destructor.
|
||||
|
Loading…
x
Reference in New Issue
Block a user