Fix compiler warnings

This commit is contained in:
dak664 2010-10-23 15:26:46 +00:00
parent 5e10cf2eed
commit 123e3cae41
11 changed files with 42 additions and 10 deletions

View file

@ -9,6 +9,9 @@
#include "uip.h"
#include "sicslow_ethernet.h"
#include <stdio.h>
#if RF230BB
#include "rf230bb.h"
#endif
#include <avr/pgmspace.h>
#include <util/delay.h>

View file

@ -72,6 +72,9 @@ RNDIS Status Information:
#include "sicslow_ethernet.h"
#include <avr/pgmspace.h>
#include <string.h>
#if RF230BB
#include "rf230bb.h"
#endif
#include <stdio.h>
#include <avr/pgmspace.h>
@ -600,7 +603,7 @@ void rndis_query_process(void)
#define PARMVALUELENGTH CFGBUF->ParameterValueLength
#define PARM_NAME_LENGTH 25 /* Maximum parameter name length */
bool
void
rndis_handle_config_parm(const char* parmname,const uint8_t* parmvalue,size_t parmlength) {
if (strncmp_P(parmname, PSTR("rawmode"), 7) == 0) {
if (parmvalue[0] == '0') {

View file

@ -52,12 +52,16 @@
#include "usb_specific_request.h"
#include "rndis/rndis_task.h"
#include "rndis/rndis_protocol.h"
#if RF230BB
#include "rf230bb.h"
#endif
#include "uip.h"
#include "sicslow_ethernet.h"
#include <stdio.h>
#include <avr/pgmspace.h>
#include <util/delay.h>
#include "watchdog.h"
#include "rndis/cdc_ecm.h"
#include "rndis/cdc_eem.h"

View file

@ -46,6 +46,7 @@
#include "usb_drv.h"
#include "usb_descriptors.h"
#include "serial/uart_usb_lib.h"
#include "cdc_task.h"
#include <stdio.h>
/**

View file

@ -51,6 +51,7 @@
#include "usb_specific_request.h"
#include "rndis/rndis_protocol.h"
#include "rndis/cdc_ecm.h"
#include "rndis/rndis_task.h"
#include "serial/uart_usb_lib.h"
#include "storage/ctrl_access.h"
#include "uip.h"
@ -416,7 +417,8 @@ void cdc_set_line_coding (void)
void cdc_set_control_line_state (void)
{
U8 controlLineState = Usb_read_byte();
U8 dummy = Usb_read_byte();
// U8 dummy = Usb_read_byte(); //Compiler warning
if (Usb_read_byte()) {};
U8 interface = Usb_read_byte();
Usb_ack_receive_setup();

View file

@ -61,6 +61,9 @@
#else
#include "radio.h"
#endif
#if USB_CONF_RS232
#include "dev/rs232.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include "dev/watchdog.h"

View file

@ -182,12 +182,19 @@ extern void mac_log_802_15_4_rx(const uint8_t* buffer, size_t total_len);
/* ************************************************************************** */
//#pragma mark Serial Port Settings
/* ************************************************************************** */
/* Set USB_CONF_MACINTOSH to prefer CDC-ECM+DEBUG enumeration for Mac/Linux
* Leave undefined to prefer RNDIS+DEBUG enumeration for Windows/Linux
* TODO:Serial port will enumerate in all cases and prevent falling through to
* the supported network interface if USB_CONF_MACINTOSH is used with Windows
* or vice versa. If Windows has previously cached the RNDIS driver for the stick
* it will attempt to use it and give "device can not start" error.
* This doesn't seem to hurt anything but can potentially damage the OS!
*/
//#define USB_CONF_MACINTOSH 1
/* Disable mass storage enumeration for more program space */
/* TODO: Mass storage is currently broken */
#define USB_CONF_STORAGE 0
//#define USB_CONF_STORAGE 1
/* Use either USB CDC or RS232 for stdout (or neither) */
/* TODO:CDC is currently broken on windows/linux, use RS232 */
#define USB_CONF_CDC 1
//#define USB_CONF_RS232 1

View file

@ -70,7 +70,8 @@
#include "usb_task.h"
#if USB_CONF_CDC
#include "cdc_task.h"
#elif USB_CONF_RS232
#endif
#if USB_CONF_RS232
#include "dev/rs232.h"
#endif
@ -243,6 +244,7 @@ get_eui64_from_eeprom(uint8_t macptr[8]) {
return macptr[0]!=0xFF;
}
#if JACKDAW_CONF_RANDOM_MAC
static bool
set_eui64_to_eeprom(const uint8_t macptr[8]) {
#if JACKDAW_CONF_USE_SETTINGS
@ -264,6 +266,7 @@ generate_new_eui64(uint8_t eui64[8]) {
eui64[6] = rng_get_uint8();
eui64[7] = rng_get_uint8();
}
#endif /* JACKDAW_CONF_RANDOM_MAC */
static uint16_t
get_panid_from_eeprom(void) {
@ -450,9 +453,10 @@ static void initialize(void) {
#endif /* RF230BB */
printf_P(PSTR("System online.\n\r"));
}
#elif USB_CONF_RS232
printf_P(PSTR("System online.\n"));
#endif /* USB_CONF_CDC */
#if USB_CONF_RS232
printf_P(PSTR("System online.\n"));
#endif /* USB_CONF_RS232 */
#endif /* ANNOUNCE */
}

View file

@ -26,7 +26,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: httpd-simple-avr.c,v 1.2 2010/10/19 18:29:05 adamdunkels Exp $
* $Id: httpd-simple-avr.c,v 1.3 2010/10/23 15:26:46 dak664 Exp $
*/
/**
@ -133,6 +133,10 @@ generate_string_P(void *sstr)
#endif
}
/*---------------------------------------------------------------------------*/
#if FIND_THE_SCRIPT
/* Needed if more than one script is implemented.
* The generate_routes RPL page is hard coded at present
*/
static
PT_THREAD(send_string_P(struct httpd_state *s, char *str))
{
@ -140,6 +144,7 @@ PT_THREAD(send_string_P(struct httpd_state *s, char *str))
PSOCK_GENERATOR_SEND(&s->sout, generate_string_P, str);
PSOCK_END(&s->sout);
}
#endif
/*---------------------------------------------------------------------------*/
char http_content_type_html[] PROGMEM = "Content-type: text/html\r\n\r\n";
static