From 987ad2eb3a89ad920988d38fe8068dda1cd6f16d Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Sun, 3 Apr 2022 22:11:13 -0600 Subject: [PATCH] a few config tweaks --- src/easymotor-v3/Makefile | 5 ++--- src/easymotor-v3/ao_easymotor.c | 2 +- src/easymotor-v3/ao_pins.h | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/easymotor-v3/Makefile b/src/easymotor-v3/Makefile index e4572e7b..7f1f5bfb 100644 --- a/src/easymotor-v3/Makefile +++ b/src/easymotor-v3/Makefile @@ -39,8 +39,7 @@ ALTOS_SRC = \ ao_log_motor.c \ ao_cmd.c \ ao_config.c \ - ao_dma_lpc.c \ - ao_timer_lpc.c \ + ao_timer.c \ ao_exti_lpc.c \ ao_spi_lpc.c \ ao_adc_lpc.c \ @@ -55,7 +54,7 @@ IDPRODUCT=0x002c CFLAGS = $(PRODUCT_DEF) $(LPC_CFLAGS) -PROGNAME=easymotor-v2 +PROGNAME=easymotor-v3 PROG=$(PROGNAME)-$(VERSION).elf HEX=$(PROGNAME)-$(VERSION).ihx diff --git a/src/easymotor-v3/ao_easymotor.c b/src/easymotor-v3/ao_easymotor.c index b97f2004..154c4c01 100644 --- a/src/easymotor-v3/ao_easymotor.c +++ b/src/easymotor-v3/ao_easymotor.c @@ -28,7 +28,7 @@ main(void) ao_task_init(); ao_timer_init(); - ao_dma_init(); +// ao_dma_init(); ao_spi_init(); ao_exti_init(); diff --git a/src/easymotor-v3/ao_pins.h b/src/easymotor-v3/ao_pins.h index 52632718..48485c6c 100644 --- a/src/easymotor-v3/ao_pins.h +++ b/src/easymotor-v3/ao_pins.h @@ -58,7 +58,7 @@ #define USE_EEPROM_CONFIG 0 #define USE_STORAGE_CONFIG 1 #define AO_PA11_PA12_RMP 1 -#define HAS_BEEP 1 +#define HAS_BEEP 0 #define HAS_BATTERY_REPORT 1 #define HAS_PAD_REPORT 1 #define BEEPER_CHANNEL 3 @@ -96,10 +96,10 @@ struct ao_adc { }; #define AO_ADC_DUMP(p) \ - printf("tick: batt: %5d %5lu motor_pressure: %5d\n", \ + printf("tick: %5lu batt: %5d motor_pressure: %5d\n", \ (p)->tick, \ - (p)->adc.v_batt); - (p)->adc.motor_pressure, \ + (p)->adc.v_batt, \ + (p)->adc.motor_pressure); /* * Voltage divider on ADC battery sampler @@ -139,9 +139,9 @@ struct ao_adc { /* ADXL375 */ #define HAS_ADXL375 1 +#define AO_ADXL375_SPI_INDEX 0 #define AO_ADXL375_CS_PORT 0 -#define AO_ADXL375_CS_MASK (1 << 19) -#define AO_ADXL375_SPI_BUS 1 +#define AO_ADXL375_CS_PIN 19 #define AO_ADXL375_AXIS x #define AO_ADXL375_ACROSS_AXIS y -- 2.30.2