diff --git a/examples/z1/test-adxl345.c b/examples/z1/test-adxl345.c index 32c29c786..005c8a7b4 100644 --- a/examples/z1/test-adxl345.c +++ b/examples/z1/test-adxl345.c @@ -179,8 +179,8 @@ PROCESS_THREAD(accel_process, ev, data) { accm_init(); /* Register the callback functions for each interrupt */ - ACCM_REGISTER_INT1_CB((void *)accm_ff_cb); - ACCM_REGISTER_INT2_CB((void *)accm_tap_cb); + ACCM_REGISTER_INT1_CB(accm_ff_cb); + ACCM_REGISTER_INT2_CB(accm_tap_cb); /* Set what strikes the corresponding interrupts. Several interrupts per pin is possible. For the eight possible interrupts, see adxl345.h and adxl345 datasheet. */ diff --git a/platform/z1/dev/adxl345.c b/platform/z1/dev/adxl345.c index 6ddbcbc10..3cd86f6e3 100644 --- a/platform/z1/dev/adxl345.c +++ b/platform/z1/dev/adxl345.c @@ -46,8 +46,10 @@ #include "i2cmaster.h" /* Callback pointers when interrupt occurs */ -extern void (*accm_int1_cb)(u8_t reg); -extern void (*accm_int2_cb)(u8_t reg); +void (*accm_int1_cb)(u8_t reg); +void (*accm_int2_cb)(u8_t reg); + +process_event_t int1_event, int2_event; /* Bitmasks for the interrupts */ static uint16_t int1_mask = 0, int2_mask = 0; diff --git a/platform/z1/dev/adxl345.h b/platform/z1/dev/adxl345.h index 0eb80ccff..8da72cf5c 100644 --- a/platform/z1/dev/adxl345.h +++ b/platform/z1/dev/adxl345.h @@ -278,12 +278,12 @@ void accm_set_irq(uint8_t int1, uint8_t int2); #define ADXL345_SRATE_0_10 0x00 // 0.10 Hz, when I2C data rate >= 100 kHz /* Callback pointers for the interrupts */ -void (*accm_int1_cb)(u8_t reg); -void (*accm_int2_cb)(u8_t reg); +extern void (*accm_int1_cb)(u8_t reg); +extern void (*accm_int2_cb)(u8_t reg); /* Interrupt 1 and 2 events; ADXL345 signals interrupt on INT1 or INT2 pins, ISR is invoked and polls the accelerometer process which invokes the callbacks. */ -process_event_t int1_event, int2_event; // static ? +extern process_event_t int1_event, int2_event; // static ? #define ACCM_INT1 0x01 #define ACCM_INT2 0x02