summaryrefslogtreecommitdiff
path: root/src/lpc
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-12-20 22:58:10 -0800
committerKeith Packard <keithp@keithp.com>2013-12-20 22:59:35 -0800
commite11fcc299f4a1a0461a3442ca13f8984d76c30ff (patch)
tree8f19589e7bc35d3f0afbccdeef497cabce85289f /src/lpc
parent4ed108fb86676daea17264d7159c2cff9ea7a6e4 (diff)
altos: Clean up warnings for LPC products
Unused varibles, functions and parameters. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lpc')
-rw-r--r--src/lpc/ao_adc_lpc.c2
-rw-r--r--src/lpc/ao_spi_lpc.c2
-rw-r--r--src/lpc/ao_usb_lpc.c10
3 files changed, 10 insertions, 4 deletions
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_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);