Skip to content

Commit b114e95

Browse files
committed
Updating makefile and source to be compatible with 1.3.9
1 parent 4593a4c commit b114e95

7 files changed

+60
-20
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
BUILD_ALL += utils/acc_service_data_logger_rpi_sparkx
2+
3+
utils/acc_service_data_logger_rpi_sparkx : \
4+
out/acc_service_data_logger.o \
5+
libacconeer.a \
6+
libacconeer_a111_r2c.a \
7+
out/libcustomer.a \
8+
libacc_service.a \
9+
out/acc_board_rpi_sparkx.o
10+
@echo " Linking $(notdir $@)"
11+
@mkdir -p utils
12+
@$(LINK.o) -Wl,--start-group $^ -Wl,--end-group $(LOADLIBES) $(LDLIBS) -o $@
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
BUILD_ALL += utils/acc_streaming_server_rpi_sparkx
2+
3+
utils/acc_streaming_server_rpi_sparkx : \
4+
acc_streaming_server.o \
5+
cJSON.o \
6+
libacconeer.a \
7+
libacconeer_a111_r2c.a \
8+
out/libcustomer.a \
9+
libacc_service.a \
10+
out/acc_board_rpi_sparkx.o
11+
@echo " Linking $(notdir $@)"
12+
@mkdir -p utils
13+
@$(LINK.o) -Wl,--start-group $^ -Wl,--end-group $(LOADLIBES) $(LDLIBS) -o $@

Software/sparkx-sdk-addon/rule/makefile_build_example_service_envelope_rpi_sparkx.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ out/sparkx_envelope_service_example : \
44
out/example_service_envelope.o \
55
libacconeer.a \
66
libacconeer_a111_r2c.a \
7-
libacc_local_server.a \
8-
libacc_message_driver_dummy.a \
97
out/libcustomer.a \
10-
libacc_envelope.a \
11-
libacc_power_bins.a \
128
libacc_service.a \
139
out/acc_board_rpi_sparkx.o
1410
@echo " Linking $(notdir $@)"

Software/sparkx-sdk-addon/rule/makefile_build_example_service_iq_rpi_sparkx.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ out/sparkx_envelope_iq_example : \
44
out/example_service_iq.o \
55
libacconeer.a \
66
libacconeer_a111_r2c.a \
7-
libacc_local_server.a \
8-
libacc_message_driver_dummy.a \
97
out/libcustomer.a \
10-
libacc_envelope.a \
11-
libacc_power_bins.a \
128
libacc_service.a \
139
out/acc_board_rpi_sparkx.o
1410
@echo " Linking $(notdir $@)"

Software/sparkx-sdk-addon/rule/makefile_build_example_service_power_bins_rpi_sparkx.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ out/sparkx_power_bins_example : \
44
out/example_service_power_bins.o \
55
libacconeer.a \
66
libacconeer_a111_r2c.a \
7-
libacc_local_server.a \
8-
libacc_message_driver_dummy.a \
97
out/libcustomer.a \
10-
libacc_envelope.a \
11-
libacc_power_bins.a \
128
libacc_service.a \
139
out/acc_board_rpi_sparkx.o
1410
@echo " Linking $(notdir $@)"

Software/sparkx-sdk-addon/rule/makefile_build_sparkx_detector_distance.inc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@ out/sparkx_detector_distance : \
44
out/sparkx_detector_distance.o \
55
libacconeer.a \
66
libacconeer_a111_r2c.a \
7-
libacc_local_server.a \
8-
libacc_message_driver_dummy.a \
97
out/libcustomer.a \
10-
libacc_envelope.a \
11-
libacc_power_bins.a \
128
libacc_service.a \
139
libacc_detector_distance_peak.a \
1410
out/acc_board_rpi_sparkx.o

Software/sparkx-sdk-addon/source/acc_board_rpi_sparkx.c

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
#include "acc_driver_gpio_linux_sysfs.h"
1111
#include "acc_driver_spi_linux_spidev.h"
1212
#include "acc_log.h"
13-
#include "acc_os.h"
14-
#include "acc_os_linux.h"
15-
13+
#include "acc_device_os.h"
14+
#include "acc_device_spi.h"
15+
#include "acc_driver_os_linux.h"
1616

1717
/**
1818
* @brief The module name
@@ -87,6 +87,10 @@ static const uint_fast8_t sensor_interrupt_pins[SENSOR_COUNT] = {
8787
GPIO0_PIN
8888
};
8989

90+
static acc_board_isr_t master_isr;
91+
92+
static void isr_sensor1(void) { if (master_isr) master_isr(1); }
93+
9094

9195
/**
9296
* @brief Get the combined status of all sensors
@@ -347,6 +351,33 @@ bool acc_board_is_sensor_interrupt_active(acc_sensor_t sensor)
347351
}
348352

349353

354+
acc_status_t acc_board_register_isr(acc_board_isr_t isr)
355+
{
356+
acc_status_t status;
357+
358+
if (isr != NULL)
359+
{
360+
if (
361+
(status = acc_device_gpio_register_isr(GPIO0_PIN, ACC_DEVICE_GPIO_EDGE_RISING, &isr_sensor1))
362+
) {
363+
return status;
364+
}
365+
}
366+
else
367+
{
368+
if (
369+
(status = acc_device_gpio_register_isr(GPIO0_PIN, ACC_DEVICE_GPIO_EDGE_NONE, NULL))
370+
) {
371+
return status;
372+
}
373+
}
374+
375+
master_isr = isr;
376+
377+
return ACC_STATUS_SUCCESS;
378+
}
379+
380+
350381
float acc_board_get_ref_freq(void)
351382
{
352383
return ACC_BOARD_REF_FREQ;
@@ -366,4 +397,4 @@ acc_status_t acc_board_set_ref_freq(float ref_freq)
366397
ACC_UNUSED(ref_freq);
367398

368399
return ACC_STATUS_UNSUPPORTED;
369-
}
400+
}

0 commit comments

Comments
 (0)