diff options
Diffstat (limited to 'src/lpc')
| -rw-r--r-- | src/lpc/Makefile-lpc.defs | 9 | ||||
| -rw-r--r-- | src/lpc/ao_adc_lpc.c | 2 | ||||
| -rw-r--r-- | src/lpc/ao_exti_lpc.c | 2 | ||||
| -rw-r--r-- | src/lpc/ao_spi_lpc.c | 2 | ||||
| -rw-r--r-- | src/lpc/ao_usb_lpc.c | 10 | ||||
| -rw-r--r-- | src/lpc/lpc.h | 2 |
6 files changed, 18 insertions, 9 deletions
diff --git a/src/lpc/Makefile-lpc.defs b/src/lpc/Makefile-lpc.defs index 3d55cf67..fecb9135 100644 --- a/src/lpc/Makefile-lpc.defs +++ b/src/lpc/Makefile-lpc.defs @@ -4,7 +4,7 @@ endif include $(TOPDIR)/Makedefs -vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/core:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR/aes):$(TOPDIR) +vpath % $(TOPDIR)/lpc:$(TOPDIR)/product:$(TOPDIR)/drivers:$(TOPDIR)/core:$(TOPDIR)/util:$(TOPDIR)/kalman:$(TOPDIR/aes):$(TOPDIR):$(TOPDIR)/math vpath make-altitude $(TOPDIR)/util vpath make-kalman $(TOPDIR)/util vpath kalman.5c $(TOPDIR)/kalman @@ -26,8 +26,11 @@ endif ELFTOHEX=$(TOPDIR)/../ao-tools/ao-elftohex/ao-elftohex CC=$(ARM_CC) -AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) $(PDCLIB_INCLUDES) -LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb -ffreestanding -nostdlib $(AO_CFLAGS) +WARN_FLAGS=-Wall -Wextra -Werror + +AO_CFLAGS=-I. -I$(TOPDIR)/lpc -I$(TOPDIR)/core -I$(TOPDIR)/drivers -I$(TOPDIR)/product -I$(TOPDIR) -I$(TOPDIR)/math -I$(TOPDIR) $(PDCLIB_INCLUDES) +LPC_CFLAGS=-std=gnu99 -mlittle-endian -mcpu=cortex-m0 -mthumb\ + -ffreestanding -nostdlib $(AO_CFLAGS) $(WARN_FLAGS) NICKLE=nickle diff --git a/src/lpc/ao_adc_lpc.c b/src/lpc/ao_adc_lpc.c index 7005f86e..e1aae0e4 100644 --- a/src/lpc/ao_adc_lpc.c +++ b/src/lpc/ao_adc_lpc.c @@ -149,8 +149,10 @@ static void ao_adc_dump(void) __reentrant { struct ao_data packet; +#ifndef AO_ADC_DUMP int16_t *d; uint8_t i; +#endif ao_data_get(&packet); #ifdef AO_ADC_DUMP diff --git a/src/lpc/ao_exti_lpc.c b/src/lpc/ao_exti_lpc.c index 588cf58c..941aa965 100644 --- a/src/lpc/ao_exti_lpc.c +++ b/src/lpc/ao_exti_lpc.c @@ -91,7 +91,7 @@ ao_exti_setup (uint8_t port, uint8_t pin, uint8_t mode, void (*callback)(void)) if (pint == LPC_NUM_PINT) ao_panic(AO_PANIC_EXTI); - if (!mode & AO_EXTI_PIN_NOCONFIGURE) + if (!(mode & AO_EXTI_PIN_NOCONFIGURE)) ao_enable_input(port, pin, mode); ao_arch_block_interrupts(); diff --git a/src/lpc/ao_spi_lpc.c b/src/lpc/ao_spi_lpc.c index a889137c..e72b8286 100644 --- a/src/lpc/ao_spi_lpc.c +++ b/src/lpc/ao_spi_lpc.c @@ -21,8 +21,6 @@ static uint8_t ao_spi_mutex[LPC_NUM_SPI]; static struct lpc_ssp * const ao_lpc_ssp[LPC_NUM_SPI] = { &lpc_ssp0, &lpc_ssp1 }; -static uint8_t spi_dev_null; - #define tx_busy(lpc_ssp) (lpc_ssp->sr & ((1 << LPC_SSP_SR_BSY) | (1 << LPC_SSP_SR_TNF))) != (1 << LPC_SSP_SR_TNF) #define rx_busy(lpc_ssp) (lpc_ssp->sr & ((1 << LPC_SSP_SR_BSY) | (1 << LPC_SSP_SR_RNE))) != (1 << LPC_SSP_SR_RNE) diff --git a/src/lpc/ao_usb_lpc.c b/src/lpc/ao_usb_lpc.c index 686dc3a4..d02ccdd6 100644 --- a/src/lpc/ao_usb_lpc.c +++ b/src/lpc/ao_usb_lpc.c @@ -111,7 +111,6 @@ static uint8_t ao_usb_in_pending; static uint8_t ao_usb_out_avail; static uint8_t ao_usb_running; static uint8_t ao_usb_configuration; -static uint8_t ueienx_0; #define AO_USB_EP0_GOT_RESET 1 #define AO_USB_EP0_GOT_SETUP 2 @@ -246,11 +245,13 @@ ao_usb_epn_in(uint8_t n) return &lpc_usb_endpoint.epn[n-1].in[0]; } +#if UNUSED static void ao_usb_set_epn_in(uint8_t n, uint8_t *addr, uint16_t nbytes) { ao_usb_set_ep(ao_usb_epn_in(n), addr, nbytes); } +#endif static void ao_usb_set_epn_out(uint8_t n, uint8_t *addr, uint16_t nbytes) @@ -633,11 +634,12 @@ ao_usb_ep0_handle(uint8_t receive) } } -static uint16_t control_count; +#if USB_DEBUG static uint16_t int_count; static uint16_t in_count; static uint16_t out_count; static uint16_t reset_count; +#endif void lpc_usb_irq_isr(void) @@ -665,7 +667,9 @@ lpc_usb_irq_isr(void) /* Handle OUT packets */ if (intstat & (1 << LPC_USB_INT_EPOUT(AO_USB_OUT_EP))) { +#if USB_DEBUG ++out_count; +#endif _rx_dbg1("RX ISR", *ao_usb_epn_out(AO_USB_OUT_EP)); ao_usb_out_avail = 1; _rx_dbg0("out avail set"); @@ -675,7 +679,9 @@ lpc_usb_irq_isr(void) /* Handle IN packets */ if (intstat & (1 << LPC_USB_INT_EPIN(AO_USB_IN_EP))) { +#if USB_DEBUG ++in_count; +#endif _tx_dbg1("TX ISR", *ao_usb_epn_in(AO_USB_IN_EP)); ao_usb_in_pending = 0; ao_wakeup(&ao_usb_in_pending); diff --git a/src/lpc/lpc.h b/src/lpc/lpc.h index 3300c86f..9408ceab 100644 --- a/src/lpc/lpc.h +++ b/src/lpc/lpc.h @@ -120,7 +120,7 @@ extern struct lpc_ioconf lpc_ioconf; #define LPC_IOCONF_FUNC_PIO0_3 0 #define LPC_IOCONF_FUNC_USB_VBUS 1 -/* PIO0_4 +/* PIO0_4 */ #define LPC_IOCONF_FUNC_PIO0_4 0 #define LPC_IOCONF_FUNC_I2C_SCL 1 |
