Changes to get PX4 config to build. Also some warning removal

This commit is contained in:
Gregory Nutt 2014-01-14 13:30:22 -06:00
parent e37c12e88c
commit dd4e64d9f3
4 changed files with 21 additions and 11 deletions

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/common/up_mdelay.c * arch/arm/src/common/up_mdelay.c
* *
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. * Copyright (C) 2007, 2008, 2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -78,13 +78,13 @@
void up_mdelay(unsigned int milliseconds) void up_mdelay(unsigned int milliseconds)
{ {
volatile int i; volatile unsigned int i;
volatile int j; volatile unsigned int j;
for (i = 0; i < milliseconds; i++) for (i = 0; i < milliseconds; i++)
{ {
for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++) for (j = 0; j < CONFIG_BOARD_LOOPSPERMSEC; j++)
{ {
} }
} }
} }

View File

@ -1324,11 +1324,11 @@ static void stm32_epin_request(FAR struct stm32_usbdev_s *priv,
*/ */
regval = stm32_getreg(regaddr); regval = stm32_getreg(regaddr);
if ((regval & OTGFS_DTXFSTS_MASK) < nwords) if ((int)(regval & OTGFS_DTXFSTS_MASK) < nwords)
{ {
usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPIN_EMPWAIT), (uint16_t)regval); usbtrace(TRACE_INTDECODE(STM32_TRACEINTID_EPIN_EMPWAIT), (uint16_t)regval);
/* There is insufficent space in the TxFIFO. Wait for a TxFIFO /* There is insufficient space in the TxFIFO. Wait for a TxFIFO
* empty interrupt and try again. * empty interrupt and try again.
*/ */

View File

@ -1,7 +1,7 @@
/************************************************************************************ /************************************************************************************
* arch/arm/src/stm32/stm32_rcc.h * arch/arm/src/stm32/stm32_rcc.h
* *
* Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved. * Copyright (C) 2009, 2011-2014 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.orgr> * Author: Gregory Nutt <gnutt@nuttx.orgr>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -285,6 +285,16 @@ void stm32_rcc_enablelse(void);
void stm32_rcc_enablelsi(void); void stm32_rcc_enablelsi(void);
/****************************************************************************
* Name: stm32_rcc_disablelsi
*
* Description:
* Disable the Internal Low-Speed (LSI) RC Oscillator.
*
****************************************************************************/
void stm32_rcc_disablelsi(void);
#undef EXTERN #undef EXTERN
#if defined(__cplusplus) #if defined(__cplusplus)
} }

View File

@ -1023,7 +1023,7 @@ static void stm32_sendfifo(struct stm32_dev_s *priv)
int i; int i;
data.w = 0; data.w = 0;
for (i = 0; i < priv->remaining; i++) for (i = 0; i < (int)priv->remaining; i++)
{ {
data.b[i] = *ptr++; data.b[i] = *ptr++;
} }
@ -1085,7 +1085,7 @@ static void stm32_recvfifo(struct stm32_dev_s *priv)
uint8_t *ptr = (uint8_t*)priv->buffer; uint8_t *ptr = (uint8_t*)priv->buffer;
int i; int i;
for (i = 0; i < priv->remaining; i++) for (i = 0; i < (int)priv->remaining; i++)
{ {
*ptr++ = data.b[i]; *ptr++ = data.b[i];
} }