diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/ao_log.c | 2 | ||||
| -rw-r--r-- | src/core/ao_log_mini.c | 4 | ||||
| -rw-r--r-- | src/core/ao_notask.c | 1 | ||||
| -rw-r--r-- | src/core/ao_telemetry.c | 2 | ||||
| -rw-r--r-- | src/drivers/ao_cc115l.c | 26 | ||||
| -rw-r--r-- | src/lpc/ao_adc_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/product/ao_flash_task.c | 1 | 
9 files changed, 28 insertions, 22 deletions
| diff --git a/src/core/ao_log.c b/src/core/ao_log.c index 701c81ab..20febefe 100644 --- a/src/core/ao_log.c +++ b/src/core/ao_log.c @@ -196,7 +196,9 @@ ao_log_full(void)  	return ao_log_current_pos == ao_log_end_pos;  } +#if HAS_ADC  static __xdata struct ao_task ao_log_task; +#endif  void  ao_log_list(void) __reentrant diff --git a/src/core/ao_log_mini.c b/src/core/ao_log_mini.c index 99a85982..29e3bd9f 100644 --- a/src/core/ao_log_mini.c +++ b/src/core/ao_log_mini.c @@ -78,7 +78,7 @@ typedef uint8_t check_log_size[1-(256 % sizeof(struct ao_log_mini))] ;  void  ao_log(void)  { -	__pdata uint16_t	next_sensor, next_other; +	__pdata uint16_t	next_sensor;  	ao_storage_setup(); @@ -99,7 +99,7 @@ ao_log(void)  	 * when starting up.  	 */  	ao_log_data_pos = ao_data_ring_next(ao_data_head); -	next_other = next_sensor = ao_data_ring[ao_log_data_pos].tick; +	next_sensor = ao_data_ring[ao_log_data_pos].tick;  	ao_log_state = ao_flight_startup;  	for (;;) {  		/* Write samples to EEPROM */ diff --git a/src/core/ao_notask.c b/src/core/ao_notask.c index a41712d2..6f967e6d 100644 --- a/src/core/ao_notask.c +++ b/src/core/ao_notask.c @@ -41,5 +41,6 @@ ao_sleep(__xdata void *wchan)  void  ao_wakeup(__xdata void *wchan)  { +	(void) wchan;  	ao_wchan = 0;  } diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index 86158063..5a00d825 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -24,9 +24,9 @@  #endif  static __pdata uint16_t ao_telemetry_interval; -static __pdata uint8_t ao_rdf = 0;  #if HAS_RDF +static __pdata uint8_t ao_rdf = 0;  static __pdata uint16_t ao_rdf_time;  #endif diff --git a/src/drivers/ao_cc115l.c b/src/drivers/ao_cc115l.c index 0fa1e899..5d4f3bd6 100644 --- a/src/drivers/ao_cc115l.c +++ b/src/drivers/ao_cc115l.c @@ -29,8 +29,6 @@ static uint8_t ao_radio_fifo;		/* fifo drained interrupt received */  static uint8_t ao_radio_done;		/* tx done interrupt received */  static uint8_t ao_radio_wake;		/* sleep address for radio interrupts */  static uint8_t ao_radio_abort;		/* radio operation should abort */ -static uint8_t ao_radio_mcu_wake;	/* MARC status change */ -static uint8_t ao_radio_marcstate;	/* Last read MARC state value */  /* Debugging commands */  #define CC115L_DEBUG	0 @@ -106,7 +104,6 @@ static uint8_t  ao_radio_reg_read(uint8_t addr)  {  	uint8_t	data[1]; -	uint8_t	d;  	data[0] = ((1 << CC115L_READ)  |  		   (0 << CC115L_BURST) | @@ -123,7 +120,6 @@ static void  ao_radio_reg_write(uint8_t addr, uint8_t value)  {  	uint8_t	data[2]; -	uint8_t	d;  	trace_add(trace_write, addr, value, NULL);  	data[0] = ((0 << CC115L_READ)  | @@ -135,11 +131,11 @@ ao_radio_reg_write(uint8_t addr, uint8_t value)  	ao_radio_deselect();  } +#if UNUSED  static void  ao_radio_burst_read_start (uint16_t addr)  {  	uint8_t data[1]; -	uint8_t d;  	data[0] = ((1 << CC115L_READ)  |  		   (1 << CC115L_BURST) | @@ -153,6 +149,7 @@ ao_radio_burst_read_stop (void)  {  	ao_radio_deselect();  } +#endif  static uint8_t @@ -200,19 +197,23 @@ ao_radio_tx_fifo_space(void)  	return CC115L_FIFO_SIZE - (ao_radio_reg_read(CC115L_TXBYTES) & CC115L_TXBYTES_NUM_TX_BYTES_MASK);  } +#if UNUSED  static uint8_t  ao_radio_status(void)  {  	return ao_radio_strobe (CC115L_SNOP);  } +#endif  #define ao_radio_rdf_value 0x55 +#if UNUSED  static uint8_t  ao_radio_get_marcstate(void)  {  	return ao_radio_reg_read(CC115L_MARCSTATE) & CC115L_MARCSTATE_MASK;  } +#endif  static void  ao_radio_done_isr(void) @@ -233,11 +234,6 @@ ao_radio_fifo_isr(void)  }  static void -ao_radio_start_tx(void) -{ -} - -static void  ao_radio_idle(void)  {  	ao_radio_pa_off(); @@ -401,7 +397,7 @@ static void  ao_radio_set_mode(uint16_t new_mode)  {  	uint16_t changes; -	int i; +	unsigned int i;  	if (new_mode == ao_radio_mode)  		return; @@ -466,7 +462,7 @@ static uint8_t	ao_radio_configured = 0;  static void  ao_radio_setup(void)  { -	int	i; +	unsigned int	i;  	ao_radio_strobe(CC115L_SRES);  	ao_delay(AO_MS_TO_TICKS(10)); @@ -730,8 +726,6 @@ ao_radio_send_fill(uint8_t *buf, int16_t len)  void  ao_radio_send(const void *d, uint8_t size)  { -	int i; -  	ao_radio_get();  	ao_radio_send_len = ao_fec_encode(d, size, tx_data);  	ao_radio_send_buf = tx_data; @@ -912,7 +906,6 @@ static void ao_radio_packet(void) {  	ao_radio_send(packet, sizeof (packet));  } -#endif /* CC115L_DEBUG */  #if HAS_APRS  #include <ao_aprs.h> @@ -926,6 +919,7 @@ ao_radio_aprs()  	ao_aprs_send();  }  #endif +#endif /* CC115L_DEBUG */  static const struct ao_cmds ao_radio_cmds[] = {  	{ ao_radio_test_cmd,	"C <1 start, 0 stop, none both>\0Radio carrier test" }, @@ -943,7 +937,9 @@ static const struct ao_cmds ao_radio_cmds[] = {  void  ao_radio_init(void)  { +#if 0  	int	i; +#endif  	ao_radio_configured = 0;  	ao_spi_init_cs (AO_CC115L_SPI_CS_PORT, (1 << AO_CC115L_SPI_CS_PIN)); 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); diff --git a/src/product/ao_flash_task.c b/src/product/ao_flash_task.c index 4cfbf75f..6cb308e1 100644 --- a/src/product/ao_flash_task.c +++ b/src/product/ao_flash_task.c @@ -24,6 +24,7 @@  void  ao_panic(uint8_t reason)  { +	(void) reason;  }  void | 
