Standardize the width of all comment boxes in C files

This commit is contained in:
Gregory Nutt
2015-10-03 07:25:53 -06:00
parent 0f90500f72
commit 16b32bbadd
38 changed files with 658 additions and 658 deletions
+1 -1
Submodule arch updated: 277302f14a...5fa7ebb25b
+1 -1
Submodule configs updated: 55aaa32ed3...d074eda220
+2 -2
View File
@@ -54,9 +54,9 @@
#include "testmngr.h" #include "testmngr.h"
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
#ifndef ARRAY_SIZE #ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) # define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+48 -48
View File
@@ -1,4 +1,4 @@
/****************************************************************************** /****************************************************************************
* drivers/lcd/ili9341.c * drivers/lcd/ili9341.c
* *
* LCD driver for the ILI9341 LCD Single Chip Driver * LCD driver for the ILI9341 LCD Single Chip Driver
@@ -37,11 +37,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -58,9 +58,9 @@
#include <arch/irq.h> #include <arch/irq.h>
/****************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************/ ****************************************************************************/
/* /*
* This is the generic lcd driver interface for the ili9341 Single Chip LCD * This is the generic lcd driver interface for the ili9341 Single Chip LCD
@@ -383,9 +383,9 @@
# define lcdvdbg(x...) # define lcdvdbg(x...)
#endif #endif
/****************************************************************************** /****************************************************************************
* Private Type Definition * Private Type Definition
******************************************************************************/ ****************************************************************************/
/* /*
* Each single connected ili9341 LCD driver needs an own driver instance * Each single connected ili9341 LCD driver needs an own driver instance
@@ -436,9 +436,9 @@ struct ili9341_dev_s
}; };
/****************************************************************************** /****************************************************************************
* Private Function Protototypes * Private Function Protototypes
******************************************************************************/ ****************************************************************************/
/* Internal low level helpers */ /* Internal low level helpers */
@@ -492,9 +492,9 @@ static int ili9341_setpower(struct lcd_dev_s *dev, int power);
static int ili9341_getcontrast(struct lcd_dev_s *dev); static int ili9341_getcontrast(struct lcd_dev_s *dev);
static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast); static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
/****************************************************************************** /****************************************************************************
* Private Data * Private Data
******************************************************************************/ ****************************************************************************/
/* Initialize driver instance 1 < LCD_ILI9341_NINTERFACES */ /* Initialize driver instance 1 < LCD_ILI9341_NINTERFACES */
@@ -537,11 +537,11 @@ static struct ili9341_dev_s g_lcddev[CONFIG_LCD_ILI9341_NINTERFACES] =
#endif #endif
}; };
/****************************************************************************** /****************************************************************************
* Private Functions * Private Functions
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Name: ili9341_getxres * Name: ili9341_getxres
* *
* Description: * Description:
@@ -555,7 +555,7 @@ static struct ili9341_dev_s g_lcddev[CONFIG_LCD_ILI9341_NINTERFACES] =
* *
* Horicontal resolution * Horicontal resolution
* *
******************************************************************************/ ****************************************************************************/
static inline uint16_t ili9341_getxres(FAR struct ili9341_dev_s *dev) static inline uint16_t ili9341_getxres(FAR struct ili9341_dev_s *dev)
{ {
@@ -569,7 +569,7 @@ static inline uint16_t ili9341_getxres(FAR struct ili9341_dev_s *dev)
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_getyres * Name: ili9341_getyres
* *
* Description: * Description:
@@ -583,7 +583,7 @@ static inline uint16_t ili9341_getxres(FAR struct ili9341_dev_s *dev)
* *
* Vertical resolution * Vertical resolution
* *
******************************************************************************/ ****************************************************************************/
static inline uint16_t ili9341_getyres(FAR struct ili9341_dev_s *dev) static inline uint16_t ili9341_getyres(FAR struct ili9341_dev_s *dev)
{ {
@@ -597,7 +597,7 @@ static inline uint16_t ili9341_getyres(FAR struct ili9341_dev_s *dev)
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_selectarea * Name: ili9341_selectarea
* *
* Description: * Description:
@@ -610,7 +610,7 @@ static inline uint16_t ili9341_getyres(FAR struct ili9341_dev_s *dev)
* x1 - End x position * x1 - End x position
* y1 - End y position * y1 - End y position
* *
******************************************************************************/ ****************************************************************************/
static void ili9341_selectarea(FAR struct ili9341_lcd_s *lcd, static void ili9341_selectarea(FAR struct ili9341_lcd_s *lcd,
uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1) uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1)
@@ -633,7 +633,7 @@ static void ili9341_selectarea(FAR struct ili9341_lcd_s *lcd,
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_putrun * Name: ili9341_putrun
* *
* Description: * Description:
@@ -652,7 +652,7 @@ static void ili9341_selectarea(FAR struct ili9341_lcd_s *lcd,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_putrun(int devno, fb_coord_t row, fb_coord_t col, static int ili9341_putrun(int devno, fb_coord_t row, fb_coord_t col,
FAR const uint8_t * buffer, size_t npixels) FAR const uint8_t * buffer, size_t npixels)
@@ -693,7 +693,7 @@ static int ili9341_putrun(int devno, fb_coord_t row, fb_coord_t col,
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_getrun * Name: ili9341_getrun
* *
* Description: * Description:
@@ -712,7 +712,7 @@ static int ili9341_putrun(int devno, fb_coord_t row, fb_coord_t col,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
# ifndef CONFIG_LCD_NOGETRUN # ifndef CONFIG_LCD_NOGETRUN
static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col, static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col,
@@ -754,7 +754,7 @@ static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col,
} }
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: ili9341_hwinitialize * Name: ili9341_hwinitialize
* *
* Description: * Description:
@@ -768,7 +768,7 @@ static int ili9341_getrun(int devno, fb_coord_t row, fb_coord_t col,
* On success - OK * On success - OK
* On error - EINVAL * On error - EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev) static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
{ {
@@ -846,11 +846,11 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
} }
/******************************************************************************* /****************************************************************************
* Public Functions * Public Functions
******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: ili9341_putrunx * Name: ili9341_putrunx
* *
* Description: * Description:
@@ -868,7 +868,7 @@ static int ili9341_hwinitialize(FAR struct ili9341_dev_s *dev)
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_LCD_ILI9341_IFACE0 #ifdef CONFIG_LCD_ILI9341_IFACE0
static int ili9341_putrun0(fb_coord_t row, fb_coord_t col, static int ili9341_putrun0(fb_coord_t row, fb_coord_t col,
@@ -887,7 +887,7 @@ static int ili9341_putrun1(fb_coord_t row, fb_coord_t col,
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: ili9341_getrunx * Name: ili9341_getrunx
* *
* Description: * Description:
@@ -905,7 +905,7 @@ static int ili9341_putrun1(fb_coord_t row, fb_coord_t col,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
#ifndef CONFIG_LCD_NOGETRUN #ifndef CONFIG_LCD_NOGETRUN
# ifdef CONFIG_LCD_ILI9341_IFACE0 # ifdef CONFIG_LCD_ILI9341_IFACE0
@@ -926,7 +926,7 @@ static int ili9341_getrun1(fb_coord_t row, fb_coord_t col,
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: ili9341_getvideoinfo * Name: ili9341_getvideoinfo
* *
* Description: * Description:
@@ -941,7 +941,7 @@ static int ili9341_getrun1(fb_coord_t row, fb_coord_t col,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev, static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev,
FAR struct fb_videoinfo_s *vinfo) FAR struct fb_videoinfo_s *vinfo)
@@ -964,7 +964,7 @@ static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev,
return -EINVAL; return -EINVAL;
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_getplaneinfo * Name: ili9341_getplaneinfo
* *
* Description: * Description:
@@ -980,7 +980,7 @@ static int ili9341_getvideoinfo(FAR struct lcd_dev_s *dev,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
FAR struct lcd_planeinfo_s *pinfo) FAR struct lcd_planeinfo_s *pinfo)
@@ -1004,7 +1004,7 @@ static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
return -EINVAL; return -EINVAL;
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_getpower * Name: ili9341_getpower
* *
* Description: * Description:
@@ -1019,7 +1019,7 @@ static int ili9341_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_getpower(FAR struct lcd_dev_s *dev) static int ili9341_getpower(FAR struct lcd_dev_s *dev)
{ {
@@ -1035,7 +1035,7 @@ static int ili9341_getpower(FAR struct lcd_dev_s *dev)
return -EINVAL; return -EINVAL;
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_setpower * Name: ili9341_setpower
* *
* Description: * Description:
@@ -1051,7 +1051,7 @@ static int ili9341_getpower(FAR struct lcd_dev_s *dev)
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power) static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power)
{ {
@@ -1092,7 +1092,7 @@ static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power)
return -EINVAL; return -EINVAL;
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_getcontrast * Name: ili9341_getcontrast
* *
* Description: * Description:
@@ -1106,7 +1106,7 @@ static int ili9341_setpower(FAR struct lcd_dev_s *dev, int power)
* On success - current contrast value * On success - current contrast value
* On error - -ENOSYS, not supported by the ili9341. * On error - -ENOSYS, not supported by the ili9341.
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_getcontrast(struct lcd_dev_s *dev) static int ili9341_getcontrast(struct lcd_dev_s *dev)
{ {
@@ -1114,7 +1114,7 @@ static int ili9341_getcontrast(struct lcd_dev_s *dev)
return -ENOSYS; return -ENOSYS;
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_setcontrast * Name: ili9341_setcontrast
* *
* Description: * Description:
@@ -1128,7 +1128,7 @@ static int ili9341_getcontrast(struct lcd_dev_s *dev)
* On success - OK * On success - OK
* On error - -ENOSYS, not supported by the ili9341. * On error - -ENOSYS, not supported by the ili9341.
* *
******************************************************************************/ ****************************************************************************/
static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
{ {
@@ -1137,7 +1137,7 @@ static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
} }
/******************************************************************************* /****************************************************************************
* Name: ili9341_initialize * Name: ili9341_initialize
* *
* Description: * Description:
@@ -1158,7 +1158,7 @@ static int ili9341_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
* On success, this function returns a reference to the LCD driver object for * On success, this function returns a reference to the LCD driver object for
* the specified LCD driver. NULL is returned on any failure. * the specified LCD driver. NULL is returned on any failure.
* *
******************************************************************************/ ****************************************************************************/
FAR struct lcd_dev_s *ili9341_initialize( FAR struct lcd_dev_s *ili9341_initialize(
FAR struct ili9341_lcd_s *lcd, int devno) FAR struct ili9341_lcd_s *lcd, int devno)
@@ -1201,7 +1201,7 @@ FAR struct lcd_dev_s *ili9341_initialize(
} }
/****************************************************************************** /****************************************************************************
* Name: ili9341_clear * Name: ili9341_clear
* *
* Description: * Description:
@@ -1219,7 +1219,7 @@ FAR struct lcd_dev_s *ili9341_initialize(
* On success - OK * On success - OK
* On error - -EINVAL * On error - -EINVAL
* *
******************************************************************************/ ****************************************************************************/
int ili9341_clear(FAR struct lcd_dev_s *dev, uint16_t color) int ili9341_clear(FAR struct lcd_dev_s *dev, uint16_t color)
{ {
+46 -46
View File
@@ -1,4 +1,4 @@
/****************************************************************************** /****************************************************************************
* drivers/lcd/memlcd.c * drivers/lcd/memlcd.c
* Driver for Sharp Memory LCD. * Driver for Sharp Memory LCD.
* *
@@ -33,11 +33,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -55,9 +55,9 @@
#include <arch/irq.h> #include <arch/irq.h>
/****************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************/ ****************************************************************************/
/* Configuration */ /* Configuration */
@@ -119,9 +119,9 @@
# define lcdvdbg(x...) # define lcdvdbg(x...)
#endif #endif
/****************************************************************************** /****************************************************************************
* Private Type Definition * Private Type Definition
******************************************************************************/ ****************************************************************************/
struct memlcd_dev_s struct memlcd_dev_s
{ {
@@ -144,9 +144,9 @@ struct memlcd_dev_s
uint8_t fb[MEMLCD_FBSIZE]; uint8_t fb[MEMLCD_FBSIZE];
}; };
/****************************************************************************** /****************************************************************************
* Private Function Protototypes * Private Function Protototypes
******************************************************************************/ ****************************************************************************/
/* Low-level spi helpers */ /* Low-level spi helpers */
@@ -180,9 +180,9 @@ static int memlcd_setpower(struct lcd_dev_s *dev, int power);
static int memlcd_getcontrast(struct lcd_dev_s *dev); static int memlcd_getcontrast(struct lcd_dev_s *dev);
static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast); static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
/****************************************************************************** /****************************************************************************
* Private Data * Private Data
******************************************************************************/ ****************************************************************************/
static uint8_t g_runbuffer[MEMLCD_BPP * MEMLCD_XRES / 8]; static uint8_t g_runbuffer[MEMLCD_BPP * MEMLCD_XRES / 8];
@@ -226,11 +226,11 @@ static struct memlcd_dev_s g_memlcddev =
}, },
}; };
/****************************************************************************** /****************************************************************************
* Private Functions * Private Functions
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* __set_bit - Set a bit in memory * __set_bit - Set a bit in memory
* *
* @nr: the bit to set * @nr: the bit to set
@@ -240,7 +240,7 @@ static struct memlcd_dev_s g_memlcddev =
* If it's called on the same region of memory simultaneously, the effect * If it's called on the same region of memory simultaneously, the effect
* may be that only one operation succeeds. * may be that only one operation succeeds.
* *
******************************************************************************/ ****************************************************************************/
#define BIT(nr) (1 << (nr)) #define BIT(nr) (1 << (nr))
#define BITS_PER_BYTE 8 #define BITS_PER_BYTE 8
@@ -266,7 +266,7 @@ static inline int __test_bit(int nr, const volatile uint8_t * addr)
return 1 & (addr[BIT_BYTE(nr)] >> (nr & (BITS_PER_BYTE - 1))); return 1 & (addr[BIT_BYTE(nr)] >> (nr & (BITS_PER_BYTE - 1)));
} }
/****************************************************************************** /****************************************************************************
* Name: memlcd_configspi * Name: memlcd_configspi
* *
* Description: * Description:
@@ -280,7 +280,7 @@ static inline int __test_bit(int nr, const volatile uint8_t * addr)
* *
* Assumptions: * Assumptions:
* *
******************************************************************************/ ****************************************************************************/
static inline void memlcd_configspi(FAR struct spi_dev_s *spi) static inline void memlcd_configspi(FAR struct spi_dev_s *spi)
{ {
@@ -307,7 +307,7 @@ static inline void memlcd_configspi(FAR struct spi_dev_s *spi)
#endif #endif
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_select * Name: memlcd_select
* *
* Description: * Description:
@@ -321,7 +321,7 @@ static inline void memlcd_configspi(FAR struct spi_dev_s *spi)
* *
* Assumptions: * Assumptions:
* *
******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SPI_OWNBUS #ifdef CONFIG_SPI_OWNBUS
static inline void memlcd_select(FAR struct spi_dev_s *spi) static inline void memlcd_select(FAR struct spi_dev_s *spi)
@@ -354,7 +354,7 @@ static void memlcd_select(FAR struct spi_dev_s *spi)
} }
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: memlcd_deselect * Name: memlcd_deselect
* *
* Description: * Description:
@@ -368,7 +368,7 @@ static void memlcd_select(FAR struct spi_dev_s *spi)
* *
* Assumptions: * Assumptions:
* *
******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SPI_OWNBUS #ifdef CONFIG_SPI_OWNBUS
static inline void memlcd_deselect(FAR struct spi_dev_s *spi) static inline void memlcd_deselect(FAR struct spi_dev_s *spi)
@@ -385,7 +385,7 @@ static void memlcd_deselect(FAR struct spi_dev_s *spi)
} }
#endif #endif
/******************************************************************************* /****************************************************************************
* Name: memlcd_clear * Name: memlcd_clear
* *
* Description: * Description:
@@ -396,7 +396,7 @@ static void memlcd_deselect(FAR struct spi_dev_s *spi)
* *
* Assumptions: * Assumptions:
* *
******************************************************************************/ ****************************************************************************/
static inline void memlcd_clear(FAR struct memlcd_dev_s *mlcd) static inline void memlcd_clear(FAR struct memlcd_dev_s *mlcd)
{ {
@@ -409,7 +409,7 @@ static inline void memlcd_clear(FAR struct memlcd_dev_s *mlcd)
memlcd_deselect(mlcd->spi); memlcd_deselect(mlcd->spi);
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_extcominisr * Name: memlcd_extcominisr
* *
* Description: * Description:
@@ -427,7 +427,7 @@ static inline void memlcd_clear(FAR struct memlcd_dev_s *mlcd)
* Assumptions: * Assumptions:
* Board specific logic needs to be provided to support it. * Board specific logic needs to be provided to support it.
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_extcominisr(int irq, FAR void *context) static int memlcd_extcominisr(int irq, FAR void *context)
{ {
@@ -445,7 +445,7 @@ static int memlcd_extcominisr(int irq, FAR void *context)
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_putrun * Name: memlcd_putrun
* *
* Description: * Description:
@@ -458,7 +458,7 @@ static int memlcd_extcominisr(int irq, FAR void *context)
* npixels - The number of pixels to write to the LCD * npixels - The number of pixels to write to the LCD
* (range: 0 < npixels <= xres-col) * (range: 0 < npixels <= xres-col)
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_putrun(fb_coord_t row, fb_coord_t col, static int memlcd_putrun(fb_coord_t row, fb_coord_t col,
FAR const uint8_t * buffer, size_t npixels) FAR const uint8_t * buffer, size_t npixels)
@@ -538,7 +538,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col,
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_getrun * Name: memlcd_getrun
* *
* Description: * Description:
@@ -550,7 +550,7 @@ static int memlcd_putrun(fb_coord_t row, fb_coord_t col,
* npixels - The number of pixels to read from the LCD * npixels - The number of pixels to read from the LCD
* (range: 0 < npixels <= xres-col) * (range: 0 < npixels <= xres-col)
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer, static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer,
size_t npixels) size_t npixels)
@@ -609,13 +609,13 @@ static int memlcd_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t * buffer,
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_getvideoinfo * Name: memlcd_getvideoinfo
* *
* Description: * Description:
* Get information about the LCD video controller configuration. * Get information about the LCD video controller configuration.
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev, static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev,
FAR struct fb_videoinfo_s *vinfo) FAR struct fb_videoinfo_s *vinfo)
{ {
@@ -627,13 +627,13 @@ static int memlcd_getvideoinfo(FAR struct lcd_dev_s *dev,
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_getplaneinfo * Name: memlcd_getplaneinfo
* *
* Description: * Description:
* Get information about the configuration of each LCD color plane. * Get information about the configuration of each LCD color plane.
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno, static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
FAR struct lcd_planeinfo_s *pinfo) FAR struct lcd_planeinfo_s *pinfo)
@@ -644,14 +644,14 @@ static int memlcd_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_getpower * Name: memlcd_getpower
* *
* Description: * Description:
* Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on. * Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on.
* On backlit LCDs, this setting may correspond to the backlight setting. * On backlit LCDs, this setting may correspond to the backlight setting.
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_getpower(FAR struct lcd_dev_s *dev) static int memlcd_getpower(FAR struct lcd_dev_s *dev)
{ {
@@ -661,14 +661,14 @@ static int memlcd_getpower(FAR struct lcd_dev_s *dev)
return mlcd->power; return mlcd->power;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_setpower * Name: memlcd_setpower
* *
* Description: * Description:
* Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). * Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on).
* On backlit LCDs, this setting may correspond to the backlight setting. * On backlit LCDs, this setting may correspond to the backlight setting.
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_setpower(FAR struct lcd_dev_s *dev, int power) static int memlcd_setpower(FAR struct lcd_dev_s *dev, int power)
{ {
@@ -690,13 +690,13 @@ static int memlcd_setpower(FAR struct lcd_dev_s *dev, int power)
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_getcontrast * Name: memlcd_getcontrast
* *
* Description: * Description:
* Get the current contrast setting (0-CONFIG_LCD_MAXCONTRAST). * Get the current contrast setting (0-CONFIG_LCD_MAXCONTRAST).
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_getcontrast(struct lcd_dev_s *dev) static int memlcd_getcontrast(struct lcd_dev_s *dev)
{ {
@@ -706,13 +706,13 @@ static int memlcd_getcontrast(struct lcd_dev_s *dev)
return mlcd->contrast; return mlcd->contrast;
} }
/******************************************************************************* /****************************************************************************
* Name: memlcd_setcontrast * Name: memlcd_setcontrast
* *
* Description: * Description:
* Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST). * Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST).
* *
******************************************************************************/ ****************************************************************************/
static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast) static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
{ {
@@ -734,11 +734,11 @@ static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Public Functions * Public Functions
******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: memlcd_initialize * Name: memlcd_initialize
* *
* Description: * Description:
@@ -757,7 +757,7 @@ static int memlcd_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
* On success, this function returns a reference to the LCD object for * On success, this function returns a reference to the LCD object for
* the specified LCD. NULL is returned on any failure. * the specified LCD. NULL is returned on any failure.
* *
******************************************************************************/ ****************************************************************************/
FAR struct lcd_dev_s *memlcd_initialize(FAR struct spi_dev_s *spi, FAR struct lcd_dev_s *memlcd_initialize(FAR struct spi_dev_s *spi,
FAR struct memlcd_priv_s *priv, FAR struct memlcd_priv_s *priv,
unsigned int devno) unsigned int devno)
+6 -6
View File
@@ -113,7 +113,7 @@ static int usbtrace_syslog(const char *fmt, ...)
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: usbtrace_enable * Name: usbtrace_enable
* *
* Description: * Description:
@@ -129,7 +129,7 @@ static int usbtrace_syslog(const char *fmt, ...)
* Assumptions: * Assumptions:
* - May be called from an interrupt handler * - May be called from an interrupt handler
* *
*******************************************************************************/ ****************************************************************************/
#if defined(CONFIG_USBDEV_TRACE) || \ #if defined(CONFIG_USBDEV_TRACE) || \
(defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB))
@@ -148,7 +148,7 @@ usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset)
} }
#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ #endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */
/******************************************************************************* /****************************************************************************
* Name: usbtrace * Name: usbtrace
* *
* Description: * Description:
@@ -157,7 +157,7 @@ usbtrace_idset_t usbtrace_enable(usbtrace_idset_t idset)
* Assumptions: * Assumptions:
* May be called from an interrupt handler * May be called from an interrupt handler
* *
*******************************************************************************/ ****************************************************************************/
#if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB)) #if defined(CONFIG_USBDEV_TRACE) || (defined(CONFIG_DEBUG) && defined(CONFIG_DEBUG_USB))
void usbtrace(uint16_t event, uint16_t value) void usbtrace(uint16_t event, uint16_t value)
@@ -200,7 +200,7 @@ void usbtrace(uint16_t event, uint16_t value)
} }
#endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ #endif /* CONFIG_USBDEV_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */
/******************************************************************************* /****************************************************************************
* Name: usbtrace_enumerate * Name: usbtrace_enumerate
* *
* Description: * Description:
@@ -209,7 +209,7 @@ void usbtrace(uint16_t event, uint16_t value)
* Assumptions: * Assumptions:
* NEVER called from an interrupt handler * NEVER called from an interrupt handler
* *
*******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBDEV_TRACE #ifdef CONFIG_USBDEV_TRACE
int usbtrace_enumerate(trace_callback_t callback, void *arg) int usbtrace_enumerate(trace_callback_t callback, void *arg)
+4 -4
View File
@@ -65,13 +65,13 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: get_trstring * Name: get_trstring
* *
* Description: * Description:
* Search the driver string data to find the string matching the provided ID. * Search the driver string data to find the string matching the provided ID.
* *
*******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBDEV_TRACE_STRINGS #ifdef CONFIG_USBDEV_TRACE_STRINGS
static FAR const char *get_trstring(FAR const struct trace_msg_t *array, static FAR const char *get_trstring(FAR const struct trace_msg_t *array,
@@ -95,13 +95,13 @@ static FAR const char *get_trstring(FAR const struct trace_msg_t *array,
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: usbtrace_trprintf * Name: usbtrace_trprintf
* *
* Description: * Description:
* Print the trace record using the supplied printing function * Print the trace record using the supplied printing function
* *
*******************************************************************************/ ****************************************************************************/
void usbtrace_trprintf(trprintf_t trprintf, uint16_t event, uint16_t value) void usbtrace_trprintf(trprintf_t trprintf, uint16_t event, uint16_t value)
{ {
+25 -25
View File
@@ -1,4 +1,4 @@
/******************************************************************************* /****************************************************************************
* drivers/usbhost/usbhost_devaddr.c * drivers/usbhost/usbhost_devaddr.c
* Manage USB device addresses * Manage USB device addresses
* *
@@ -32,11 +32,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Included Files * Included Files
*******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -48,13 +48,13 @@
#include <nuttx/usb/usbhost.h> #include <nuttx/usb/usbhost.h>
#include <nuttx/usb/usbhost_devaddr.h> #include <nuttx/usb/usbhost_devaddr.h>
/******************************************************************************* /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Private Functions * Private Functions
*******************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: usbhost_takesem and usbhost_givesem * Name: usbhost_takesem and usbhost_givesem
@@ -63,7 +63,7 @@
* This is just a wrapper to handle the annoying behavior of semaphore * This is just a wrapper to handle the annoying behavior of semaphore
* waits that return due to the receipt of a signal. * waits that return due to the receipt of a signal.
* *
*******************************************************************************/ ****************************************************************************/
static void usbhost_takesem(FAR struct usbhost_devaddr_s *devgen) static void usbhost_takesem(FAR struct usbhost_devaddr_s *devgen)
{ {
@@ -81,7 +81,7 @@ static void usbhost_takesem(FAR struct usbhost_devaddr_s *devgen)
#define usbhost_givesem(devgen) sem_post(&devgen->exclsem) #define usbhost_givesem(devgen) sem_post(&devgen->exclsem)
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_allocate * Name: usbhost_devaddr_allocate
* *
* Description: * Description:
@@ -90,7 +90,7 @@ static void usbhost_takesem(FAR struct usbhost_devaddr_s *devgen)
* Assumptions: * Assumptions:
* Caller hold the exclsem * Caller hold the exclsem
* *
*******************************************************************************/ ****************************************************************************/
static int usbhost_devaddr_allocate(FAR struct usbhost_devaddr_s *devgen) static int usbhost_devaddr_allocate(FAR struct usbhost_devaddr_s *devgen)
{ {
@@ -140,7 +140,7 @@ static int usbhost_devaddr_allocate(FAR struct usbhost_devaddr_s *devgen)
} }
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_free * Name: usbhost_devaddr_free
* *
* Description: * Description:
@@ -149,7 +149,7 @@ static int usbhost_devaddr_allocate(FAR struct usbhost_devaddr_s *devgen)
* Assumptions: * Assumptions:
* Caller hold the exclsem * Caller hold the exclsem
* *
*******************************************************************************/ ****************************************************************************/
static void usbhost_devaddr_free(FAR struct usbhost_devaddr_s *devgen, static void usbhost_devaddr_free(FAR struct usbhost_devaddr_s *devgen,
uint8_t devaddr) uint8_t devaddr)
@@ -173,13 +173,13 @@ static void usbhost_devaddr_free(FAR struct usbhost_devaddr_s *devgen,
} }
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_roothubport * Name: usbhost_roothubport
* *
* Description: * Description:
* Find and return a reference the root hub port. * Find and return a reference the root hub port.
* *
*******************************************************************************/ ****************************************************************************/
static inline FAR struct usbhost_roothubport_s * static inline FAR struct usbhost_roothubport_s *
usbhost_roothubport(FAR struct usbhost_hubport_s *hport) usbhost_roothubport(FAR struct usbhost_hubport_s *hport)
@@ -203,14 +203,14 @@ usbhost_roothubport(FAR struct usbhost_hubport_s *hport)
return (FAR struct usbhost_roothubport_s *)hport; return (FAR struct usbhost_roothubport_s *)hport;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_gen * Name: usbhost_devaddr_gen
* *
* Description: * Description:
* Find root hub port and return a reference to the device function address * Find root hub port and return a reference to the device function address
* data set. * data set.
* *
*******************************************************************************/ ****************************************************************************/
static FAR struct usbhost_devaddr_s * static FAR struct usbhost_devaddr_s *
usbhost_devaddr_gen(FAR struct usbhost_hubport_s *hport) usbhost_devaddr_gen(FAR struct usbhost_hubport_s *hport)
@@ -226,11 +226,11 @@ usbhost_devaddr_gen(FAR struct usbhost_hubport_s *hport)
return NULL; return NULL;
} }
/******************************************************************************* /****************************************************************************
* Public Functions * Public Functions
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_initialize * Name: usbhost_devaddr_initialize
* *
* Description: * Description:
@@ -244,7 +244,7 @@ usbhost_devaddr_gen(FAR struct usbhost_hubport_s *hport)
* Returned Value: * Returned Value:
* None * None
* *
*******************************************************************************/ ****************************************************************************/
void usbhost_devaddr_initialize(FAR struct usbhost_roothubport_s *rhport) void usbhost_devaddr_initialize(FAR struct usbhost_roothubport_s *rhport)
{ {
@@ -258,7 +258,7 @@ void usbhost_devaddr_initialize(FAR struct usbhost_roothubport_s *rhport)
devgen->next = 1; devgen->next = 1;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_create * Name: usbhost_devaddr_create
* *
* Description: * Description:
@@ -272,7 +272,7 @@ void usbhost_devaddr_initialize(FAR struct usbhost_roothubport_s *rhport)
* On success, a new device function address in the the range 0x01 to 0x7f * On success, a new device function address in the the range 0x01 to 0x7f
* is returned. On failure, a negated errno value is returned. * is returned. On failure, a negated errno value is returned.
* *
*******************************************************************************/ ****************************************************************************/
int usbhost_devaddr_create(FAR struct usbhost_hubport_s *hport) int usbhost_devaddr_create(FAR struct usbhost_hubport_s *hport)
{ {
@@ -302,7 +302,7 @@ int usbhost_devaddr_create(FAR struct usbhost_hubport_s *hport)
return devaddr; return devaddr;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_devaddr_destroy * Name: usbhost_devaddr_destroy
* *
* Description: * Description:
@@ -316,7 +316,7 @@ int usbhost_devaddr_create(FAR struct usbhost_hubport_s *hport)
* Returned Value: * Returned Value:
* None * None
* *
*******************************************************************************/ ****************************************************************************/
void usbhost_devaddr_destroy(FAR struct usbhost_hubport_s *hport, uint8_t devaddr) void usbhost_devaddr_destroy(FAR struct usbhost_hubport_s *hport, uint8_t devaddr)
{ {
+28 -28
View File
@@ -1,4 +1,4 @@
/******************************************************************************* /****************************************************************************
* drivers/usbhost/usbhost_enumerate.c * drivers/usbhost/usbhost_enumerate.c
* *
* Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2012, 2015 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Included Files * Included Files
*******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -53,17 +53,17 @@
#include <nuttx/usb/hub.h> #include <nuttx/usb/hub.h>
#include <nuttx/usb/usbhost_devaddr.h> #include <nuttx/usb/usbhost_devaddr.h>
/******************************************************************************* /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Private Types * Private Types
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Private Function Prototypes * Private Function Prototypes
*******************************************************************************/ ****************************************************************************/
static inline uint16_t usbhost_getle16(const uint8_t *val); static inline uint16_t usbhost_getle16(const uint8_t *val);
static void usbhost_putle16(uint8_t *dest, uint16_t val); static void usbhost_putle16(uint8_t *dest, uint16_t val);
@@ -77,17 +77,17 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
FAR struct usbhost_id_s *id, FAR struct usbhost_id_s *id,
FAR struct usbhost_class_s **devclass); FAR struct usbhost_class_s **devclass);
/******************************************************************************* /****************************************************************************
* Private Data * Private Data
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Public Data * Public Data
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Private Functions * Private Functions
*******************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: usbhost_getle16 * Name: usbhost_getle16
@@ -95,7 +95,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
* Description: * Description:
* Get a (possibly unaligned) 16-bit little endian value. * Get a (possibly unaligned) 16-bit little endian value.
* *
*******************************************************************************/ ****************************************************************************/
static inline uint16_t usbhost_getle16(const uint8_t *val) static inline uint16_t usbhost_getle16(const uint8_t *val)
{ {
@@ -108,7 +108,7 @@ static inline uint16_t usbhost_getle16(const uint8_t *val)
* Description: * Description:
* Put a (possibly unaligned) 16-bit little endian value. * Put a (possibly unaligned) 16-bit little endian value.
* *
*******************************************************************************/ ****************************************************************************/
static void usbhost_putle16(uint8_t *dest, uint16_t val) static void usbhost_putle16(uint8_t *dest, uint16_t val)
{ {
@@ -116,14 +116,14 @@ static void usbhost_putle16(uint8_t *dest, uint16_t val)
dest[1] = val >> 8; dest[1] = val >> 8;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_devdesc * Name: usbhost_devdesc
* *
* Description: * Description:
* A configuration descriptor has been obtained from the device. Find the * A configuration descriptor has been obtained from the device. Find the
* ID information for the class that supports this device. * ID information for the class that supports this device.
* *
*******************************************************************************/ ****************************************************************************/
static inline int usbhost_devdesc(FAR const struct usb_devdesc_s *devdesc, static inline int usbhost_devdesc(FAR const struct usb_devdesc_s *devdesc,
FAR struct usbhost_id_s *id) FAR struct usbhost_id_s *id)
@@ -148,14 +148,14 @@ static inline int usbhost_devdesc(FAR const struct usb_devdesc_s *devdesc,
return OK; return OK;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_configdesc * Name: usbhost_configdesc
* *
* Description: * Description:
* A configuration descriptor has been obtained from the device. Find the * A configuration descriptor has been obtained from the device. Find the
* ID information for the class that supports this device. * ID information for the class that supports this device.
* *
*******************************************************************************/ ****************************************************************************/
static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen, static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen,
struct usbhost_id_s *id) struct usbhost_id_s *id)
@@ -214,14 +214,14 @@ static inline int usbhost_configdesc(const uint8_t *configdesc, int cfglen,
return -ENOENT; return -ENOENT;
} }
/******************************************************************************* /****************************************************************************
* Name: usbhost_classbind * Name: usbhost_classbind
* *
* Description: * Description:
* A configuration descriptor has been obtained from the device. Try to * A configuration descriptor has been obtained from the device. Try to
* bind this configuration descriptor with a supported class. * bind this configuration descriptor with a supported class.
* *
*******************************************************************************/ ****************************************************************************/
static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport, static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
const uint8_t *configdesc, int desclen, const uint8_t *configdesc, int desclen,
@@ -270,11 +270,11 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
return ret; return ret;
} }
/******************************************************************************* /****************************************************************************
* Public Functions * Public Functions
*******************************************************************************/ ****************************************************************************/
/******************************************************************************* /****************************************************************************
* Name: usbhost_enumerate * Name: usbhost_enumerate
* *
* Description: * Description:
@@ -302,7 +302,7 @@ static inline int usbhost_classbind(FAR struct usbhost_hubport_s *hport,
* - Called from a single thread so no mutual exclusion is required. * - Called from a single thread so no mutual exclusion is required.
* - Never called from an interrupt handler. * - Never called from an interrupt handler.
* *
*******************************************************************************/ ****************************************************************************/
int usbhost_enumerate(FAR struct usbhost_hubport_s *hport, int usbhost_enumerate(FAR struct usbhost_hubport_s *hport,
FAR struct usbhost_class_s **devclass) FAR struct usbhost_class_s **devclass)
+2 -2
View File
@@ -230,7 +230,7 @@ void usbhost_trace2(uint16_t id, uint8_t u7, uint16_t u16)
#endif /* CONFIG_USBHOST_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */ #endif /* CONFIG_USBHOST_TRACE || CONFIG_DEBUG && CONFIG_DEBUG_USB */
/******************************************************************************* /****************************************************************************
* Name: usbtrace_enumerate * Name: usbtrace_enumerate
* *
* Description: * Description:
@@ -239,7 +239,7 @@ void usbhost_trace2(uint16_t id, uint8_t u7, uint16_t u16)
* Assumptions: * Assumptions:
* NEVER called from an interrupt handler * NEVER called from an interrupt handler
* *
*******************************************************************************/ ****************************************************************************/
#ifdef CONFIG_USBHOST_TRACE #ifdef CONFIG_USBHOST_TRACE
int usbhost_trenumerate(usbhost_trcallback_t callback, FAR void *arg) int usbhost_trenumerate(usbhost_trcallback_t callback, FAR void *arg)
+14 -14
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* cc3000_common.c.c - CC3000 Host Driver Implementation. * cc3000_common.c.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,15 +30,15 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included files * Included files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdint.h> #include <stdint.h>
/***************************************************************************** /****************************************************************************
* Name:__error__ * Name:__error__
* *
* Description: * Description:
@@ -51,9 +51,9 @@
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: UINT32_TO_STREAM_f * Name: UINT32_TO_STREAM_f
* *
* Description: * Description:
@@ -67,7 +67,7 @@
* Returned Value: * Returned Value:
* Pointer to the new stream * Pointer to the new stream
* *
*****************************************************************************/ ****************************************************************************/
uint8_t *UINT32_TO_STREAM_f(uint8_t *p, unsigned long u32) uint8_t *UINT32_TO_STREAM_f(uint8_t *p, unsigned long u32)
{ {
@@ -78,7 +78,7 @@ uint8_t *UINT32_TO_STREAM_f(uint8_t *p, unsigned long u32)
return p; return p;
} }
/***************************************************************************** /****************************************************************************
* Name: UINT16_TO_STREAM_f * Name: UINT16_TO_STREAM_f
* *
* Description: * Description:
@@ -92,7 +92,7 @@ uint8_t *UINT32_TO_STREAM_f(uint8_t *p, unsigned long u32)
* Returned Value: * Returned Value:
* Pointer to the new stream * Pointer to the new stream
* *
*****************************************************************************/ ****************************************************************************/
uint8_t *UINT16_TO_STREAM_f(uint8_t *p, uint16_t u16) uint8_t *UINT16_TO_STREAM_f(uint8_t *p, uint16_t u16)
{ {
@@ -101,7 +101,7 @@ uint8_t *UINT16_TO_STREAM_f(uint8_t *p, uint16_t u16)
return p; return p;
} }
/***************************************************************************** /****************************************************************************
* Name: STREAM_TO_UINT16_f * Name: STREAM_TO_UINT16_f
* *
* Description: * Description:
@@ -115,7 +115,7 @@ uint8_t *UINT16_TO_STREAM_f(uint8_t *p, uint16_t u16)
* Returned Value: * Returned Value:
* Pointer to the new 16 bit * Pointer to the new 16 bit
* *
*****************************************************************************/ ****************************************************************************/
uint16_t STREAM_TO_UINT16_f(char* p, uint16_t offset) uint16_t STREAM_TO_UINT16_f(char* p, uint16_t offset)
{ {
@@ -123,7 +123,7 @@ uint16_t STREAM_TO_UINT16_f(char* p, uint16_t offset)
(*(p + offset + 1)) << 8) + (uint16_t)(*(p + offset))); (*(p + offset + 1)) << 8) + (uint16_t)(*(p + offset)));
} }
/***************************************************************************** /****************************************************************************
* Name: STREAM_TO_UINT32_f * Name: STREAM_TO_UINT32_f
* *
* Description: * Description:
@@ -137,7 +137,7 @@ uint16_t STREAM_TO_UINT16_f(char* p, uint16_t offset)
* Returned Value: * Returned Value:
* Pointer to the new 32 bit * Pointer to the new 32 bit
* *
*****************************************************************************/ ****************************************************************************/
unsigned long STREAM_TO_UINT32_f(char* p, uint16_t offset) unsigned long STREAM_TO_UINT32_f(char* p, uint16_t offset)
{ {
+23 -23
View File
@@ -33,11 +33,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
@@ -57,9 +57,9 @@
#include <nuttx/wireless/cc3000.h> #include <nuttx/wireless/cc3000.h>
#include <nuttx/wireless/cc3000/cc3000_common.h> #include <nuttx/wireless/cc3000/cc3000_common.h>
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
#undef SPI_DEBUG /* Define to enable debug */ #undef SPI_DEBUG /* Define to enable debug */
#undef SPI_VERBOSE /* Define to enable verbose debug */ #undef SPI_VERBOSE /* Define to enable verbose debug */
@@ -77,9 +77,9 @@
# define spivdbg(x...) # define spivdbg(x...)
#endif #endif
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
static struct static struct
{ {
@@ -96,11 +96,11 @@ static struct
-1, -1,
}; };
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: cc3000_resume * Name: cc3000_resume
* *
* Description: * Description:
@@ -112,7 +112,7 @@ static struct
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void cc3000_resume(void) void cc3000_resume(void)
{ {
@@ -121,7 +121,7 @@ void cc3000_resume(void)
nllvdbg("Done\n"); nllvdbg("Done\n");
} }
/***************************************************************************** /****************************************************************************
* Name: cc3000_write * Name: cc3000_write
* *
* Description: * Description:
@@ -133,7 +133,7 @@ void cc3000_resume(void)
* *
* Returned Value: * Returned Value:
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_write(uint8_t *pUserBuffer, uint16_t usLength) long cc3000_write(uint8_t *pUserBuffer, uint16_t usLength)
{ {
@@ -141,7 +141,7 @@ long cc3000_write(uint8_t *pUserBuffer, uint16_t usLength)
return write(spiconf.cc3000fd,pUserBuffer,usLength) == usLength ? 0 : -errno; return write(spiconf.cc3000fd,pUserBuffer,usLength) == usLength ? 0 : -errno;
} }
/***************************************************************************** /****************************************************************************
* Name: cc3000_read * Name: cc3000_read
* *
* Description: * Description:
@@ -154,7 +154,7 @@ long cc3000_write(uint8_t *pUserBuffer, uint16_t usLength)
* *
* Returned Value: * Returned Value:
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_read(uint8_t *pUserBuffer, uint16_t usLength) long cc3000_read(uint8_t *pUserBuffer, uint16_t usLength)
{ {
@@ -162,7 +162,7 @@ long cc3000_read(uint8_t *pUserBuffer, uint16_t usLength)
return read(spiconf.cc3000fd,pUserBuffer,usLength); return read(spiconf.cc3000fd,pUserBuffer,usLength);
} }
/***************************************************************************** /****************************************************************************
* Name: cc3000_wait * Name: cc3000_wait
* *
* Description: * Description:
@@ -173,7 +173,7 @@ long cc3000_read(uint8_t *pUserBuffer, uint16_t usLength)
* *
* Returned Value: * Returned Value:
* *
*****************************************************************************/ ****************************************************************************/
uint8_t *cc3000_wait(void) uint8_t *cc3000_wait(void)
{ {
@@ -184,7 +184,7 @@ uint8_t *cc3000_wait(void)
return spiconf.rx_buffer.pbuffer; return spiconf.rx_buffer.pbuffer;
} }
/***************************************************************************** /****************************************************************************
* Name: unsoliced_thread_func * Name: unsoliced_thread_func
* *
* Description: * Description:
@@ -196,7 +196,7 @@ uint8_t *cc3000_wait(void)
* *
* Returned Value: * Returned Value:
* *
*****************************************************************************/ ****************************************************************************/
static void *unsoliced_thread_func(void *parameter) static void *unsoliced_thread_func(void *parameter)
{ {
@@ -234,7 +234,7 @@ static void *unsoliced_thread_func(void *parameter)
return (pthread_addr_t)status; return (pthread_addr_t)status;
} }
/***************************************************************************** /****************************************************************************
* Name: cc3000_open * Name: cc3000_open
* *
* Description: * Description:
@@ -246,7 +246,7 @@ static void *unsoliced_thread_func(void *parameter)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void cc3000_open(gcSpiHandleRx pfRxHandler) void cc3000_open(gcSpiHandleRx pfRxHandler)
{ {
@@ -286,7 +286,7 @@ void cc3000_open(gcSpiHandleRx pfRxHandler)
DEBUGASSERT(spiconf.cc3000fd >= 0); DEBUGASSERT(spiconf.cc3000fd >= 0);
} }
/***************************************************************************** /****************************************************************************
* Name: cc3000_close * Name: cc3000_close
* *
* Description: * Description:
@@ -298,7 +298,7 @@ void cc3000_open(gcSpiHandleRx pfRxHandler)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void cc3000_close(void) void cc3000_close(void)
{ {
+32 -32
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* evnt_handler.c - CC3000 Host Driver Implementation. * evnt_handler.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -51,9 +51,9 @@
#include "cc3000drv.h" #include "cc3000drv.h"
#include <nuttx/wireless/cc3000/netapp.h> #include <nuttx/wireless/cc3000/netapp.h>
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
#define FLOW_CONTROL_EVENT_HANDLE_OFFSET (0) #define FLOW_CONTROL_EVENT_HANDLE_OFFSET (0)
#define FLOW_CONTROL_EVENT_BLOCK_MODE_OFFSET (1) #define FLOW_CONTROL_EVENT_BLOCK_MODE_OFFSET (1)
@@ -103,23 +103,23 @@
#define GET_SCAN_RESULTS_FRAME_TIME_OFFSET (10) #define GET_SCAN_RESULTS_FRAME_TIME_OFFSET (10)
#define GET_SCAN_RESULTS_SSID_MAC_LENGTH (38) #define GET_SCAN_RESULTS_SSID_MAC_LENGTH (38)
/***************************************************************************** /****************************************************************************
* Public Data * Public Data
*****************************************************************************/ ****************************************************************************/
unsigned long socket_active_status = SOCKET_STATUS_INIT_VAL; unsigned long socket_active_status = SOCKET_STATUS_INIT_VAL;
/***************************************************************************** /****************************************************************************
* Private Function Prototypes * Private Function Prototypes
*****************************************************************************/ ****************************************************************************/
static long hci_event_unsol_flowcontrol_handler(char *pEvent); static long hci_event_unsol_flowcontrol_handler(char *pEvent);
static void update_socket_active_status(char *resp_params); static void update_socket_active_status(char *resp_params);
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: hci_unsol_handle_patch_request * Name: hci_unsol_handle_patch_request
* *
* Description: * Description:
@@ -131,7 +131,7 @@ static void update_socket_active_status(char *resp_params);
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void hci_unsol_handle_patch_request(char *event_hdr) void hci_unsol_handle_patch_request(char *event_hdr)
{ {
@@ -208,7 +208,7 @@ void hci_unsol_handle_patch_request(char *event_hdr)
} }
} }
/***************************************************************************** /****************************************************************************
* Name: hci_event_handler * Name: hci_event_handler
* *
* Description: * Description:
@@ -223,7 +223,7 @@ void hci_unsol_handle_patch_request(char *event_hdr)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
uint8_t *hci_event_handler(void *pRetParams, uint8_t *from, uint8_t *fromlen) uint8_t *hci_event_handler(void *pRetParams, uint8_t *from, uint8_t *fromlen)
{ {
@@ -552,7 +552,7 @@ uint8_t *hci_event_handler(void *pRetParams, uint8_t *from, uint8_t *fromlen)
return NULL; return NULL;
} }
/***************************************************************************** /****************************************************************************
* Name: hci_unsol_event_handler * Name: hci_unsol_event_handler
* *
* Description: * Description:
@@ -565,7 +565,7 @@ uint8_t *hci_event_handler(void *pRetParams, uint8_t *from, uint8_t *fromlen)
* 1 if event supported and handled * 1 if event supported and handled
* 0 if event is not supported * 0 if event is not supported
* *
*****************************************************************************/ ****************************************************************************/
long hci_unsol_event_handler(char *event_hdr) long hci_unsol_event_handler(char *event_hdr)
{ {
@@ -737,7 +737,7 @@ long hci_unsol_event_handler(char *event_hdr)
return 0; return 0;
} }
/***************************************************************************** /****************************************************************************
* Name: hci_unsolicited_event_handler * Name: hci_unsolicited_event_handler
* *
* Description: * Description:
@@ -750,7 +750,7 @@ long hci_unsol_event_handler(char *event_hdr)
* Returned Value: * Returned Value:
* ESUCCESS if successful, EFAIL if an error occurred * ESUCCESS if successful, EFAIL if an error occurred
* *
*****************************************************************************/ ****************************************************************************/
long hci_unsolicited_event_handler(void) long hci_unsolicited_event_handler(void)
{ {
@@ -782,7 +782,7 @@ long hci_unsolicited_event_handler(void)
return res; return res;
} }
/***************************************************************************** /****************************************************************************
* Name: set_socket_active_status * Name: set_socket_active_status
* *
* Description: * Description:
@@ -796,7 +796,7 @@ long hci_unsolicited_event_handler(void)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void set_socket_active_status(long Sd, long Status) void set_socket_active_status(long Sd, long Status)
{ {
@@ -807,7 +807,7 @@ void set_socket_active_status(long Sd, long Status)
} }
} }
/***************************************************************************** /****************************************************************************
* Name: hci_event_unsol_flowcontrol_handler * Name: hci_event_unsol_flowcontrol_handler
* *
* Description: * Description:
@@ -821,7 +821,7 @@ void set_socket_active_status(long Sd, long Status)
* Returned Value: * Returned Value:
* ESUCCESS if successful, EFAIL if an error occurred * ESUCCESS if successful, EFAIL if an error occurred
* *
*****************************************************************************/ ****************************************************************************/
long hci_event_unsol_flowcontrol_handler(char *pEvent) long hci_event_unsol_flowcontrol_handler(char *pEvent)
{ {
@@ -848,7 +848,7 @@ long hci_event_unsol_flowcontrol_handler(char *pEvent)
return(ESUCCESS); return(ESUCCESS);
} }
/***************************************************************************** /****************************************************************************
* Name: get_socket_active_status * Name: get_socket_active_status
* *
* Description: * Description:
@@ -860,7 +860,7 @@ long hci_event_unsol_flowcontrol_handler(char *pEvent)
* Returned Value: * Returned Value:
* Current status of the socket. * Current status of the socket.
* *
*****************************************************************************/ ****************************************************************************/
long get_socket_active_status(long Sd) long get_socket_active_status(long Sd)
{ {
@@ -873,7 +873,7 @@ long get_socket_active_status(long Sd)
return SOCKET_STATUS_INACTIVE; return SOCKET_STATUS_INACTIVE;
} }
/***************************************************************************** /****************************************************************************
* Name: update_socket_active_status * Name: update_socket_active_status
* *
* Description: * Description:
@@ -885,7 +885,7 @@ long get_socket_active_status(long Sd)
* Returned Value: * Returned Value:
* Current status of the socket. * Current status of the socket.
* *
*****************************************************************************/ ****************************************************************************/
void update_socket_active_status(char *resp_params) void update_socket_active_status(char *resp_params)
{ {
@@ -900,7 +900,7 @@ void update_socket_active_status(char *resp_params)
} }
} }
/***************************************************************************** /****************************************************************************
* Name: SimpleLinkWaitEvent * Name: SimpleLinkWaitEvent
* *
* Description: * Description:
@@ -914,7 +914,7 @@ void update_socket_active_status(char *resp_params)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams) void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams)
{ {
@@ -956,7 +956,7 @@ void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams)
nllvdbg("Done for opcode 0x%x\n",opcode); nllvdbg("Done for opcode 0x%x\n",opcode);
} }
/***************************************************************************** /****************************************************************************
* Name: SimpleLinkWaitData * Name: SimpleLinkWaitData
* *
* Description: * Description:
@@ -971,7 +971,7 @@ void SimpleLinkWaitEvent(uint16_t opcode, void *pRetParams)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen) void SimpleLinkWaitData(uint8_t *pBuf, uint8_t *from, uint8_t *fromlen)
{ {
+16 -16
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* hci.c - CC3000 Host Driver Implementation. * hci.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -47,16 +47,16 @@
#include <nuttx/wireless/cc3000/evnt_handler.h> #include <nuttx/wireless/cc3000/evnt_handler.h>
#include <nuttx/wireless/cc3000/wlan.h> #include <nuttx/wireless/cc3000/wlan.h>
/****************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************/ ****************************************************************************/
#define SL_PATCH_PORTION_SIZE (1000) #define SL_PATCH_PORTION_SIZE (1000)
/****************************************************************************** /****************************************************************************
* Public Functions * Public Functions
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Name: hci_command_send * Name: hci_command_send
* *
* Description: * Description:
@@ -70,7 +70,7 @@
* Returned Value: * Returned Value:
* Zero * Zero
* *
*****************************************************************************/ ****************************************************************************/
uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff, uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff,
uint8_t ucArgsLength) uint8_t ucArgsLength)
@@ -92,7 +92,7 @@ uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff,
return 0; return 0;
} }
/****************************************************************************** /****************************************************************************
* Name: hci_data_send * Name: hci_data_send
* *
* Description: * Description:
@@ -108,7 +108,7 @@ uint16_t hci_command_send(uint16_t usOpcode, uint8_t *pucBuff,
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
long hci_data_send(uint8_t ucOpcode, uint8_t *ucArgs, uint16_t usArgsLength, long hci_data_send(uint8_t ucOpcode, uint8_t *ucArgs, uint16_t usArgsLength,
uint16_t usDataLength, const uint8_t *ucTail, uint16_t usDataLength, const uint8_t *ucTail,
@@ -132,7 +132,7 @@ long hci_data_send(uint8_t ucOpcode, uint8_t *ucArgs, uint16_t usArgsLength,
return ESUCCESS; return ESUCCESS;
} }
/****************************************************************************** /****************************************************************************
* Name: hci_data_command_send * Name: hci_data_command_send
* *
* Description: * Description:
@@ -147,7 +147,7 @@ long hci_data_send(uint8_t ucOpcode, uint8_t *ucArgs, uint16_t usArgsLength,
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void hci_data_command_send(uint16_t usOpcode, uint8_t *pucBuff, void hci_data_command_send(uint16_t usOpcode, uint8_t *pucBuff,
uint8_t ucArgsLength,uint16_t ucDataLength) uint8_t ucArgsLength,uint16_t ucDataLength)
@@ -166,7 +166,7 @@ void hci_data_command_send(uint16_t usOpcode, uint8_t *pucBuff,
SIMPLE_LINK_HCI_DATA_CMND_HEADER_SIZE); SIMPLE_LINK_HCI_DATA_CMND_HEADER_SIZE);
} }
/****************************************************************************** /****************************************************************************
* Name: hci_patch_send * Name: hci_patch_send
* *
* Description: * Description:
@@ -181,7 +181,7 @@ void hci_data_command_send(uint16_t usOpcode, uint8_t *pucBuff,
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void hci_patch_send(uint8_t ucOpcode, uint8_t *pucBuff, char *patch, void hci_patch_send(uint8_t ucOpcode, uint8_t *pucBuff, char *patch,
uint16_t usDataLength) uint16_t usDataLength)
+26 -26
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* netapp.c - CC3000 Host Driver Implementation. * netapp.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <string.h> #include <string.h>
@@ -46,9 +46,9 @@
#include "cc3000.h" #include "cc3000.h"
#include "cc3000_socket.h" #include "cc3000_socket.h"
/****************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************/ ****************************************************************************/
#define MIN_TIMER_VAL_SECONDS 20 #define MIN_TIMER_VAL_SECONDS 20
#define MIN_TIMER_SET(t) if ((0 != t) && (t < MIN_TIMER_VAL_SECONDS)) \ #define MIN_TIMER_SET(t) if ((0 != t) && (t < MIN_TIMER_VAL_SECONDS)) \
@@ -62,11 +62,11 @@
#define NETAPP_SET_DEBUG_LEVEL_PARAMS_LEN (4) #define NETAPP_SET_DEBUG_LEVEL_PARAMS_LEN (4)
#define NETAPP_PING_SEND_PARAMS_LEN (16) #define NETAPP_PING_SEND_PARAMS_LEN (16)
/****************************************************************************** /****************************************************************************
* Public Functions * Public Functions
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Name: netapp_config_mac_adrress * Name: netapp_config_mac_adrress
* *
* Description: * Description:
@@ -80,14 +80,14 @@
* Returned Value: * Returned Value:
* Return on success 0, otherwise error. * Return on success 0, otherwise error.
* *
*****************************************************************************/ ****************************************************************************/
long netapp_config_mac_adrress(uint8_t *mac) long netapp_config_mac_adrress(uint8_t *mac)
{ {
return nvmem_set_mac_address(mac); return nvmem_set_mac_address(mac);
} }
/****************************************************************************** /****************************************************************************
* Name: netapp_dhcp * Name: netapp_dhcp
* *
* Description: * Description:
@@ -112,7 +112,7 @@ long netapp_config_mac_adrress(uint8_t *mac)
* Returned Value: * Returned Value:
* Return on success 0, otherwise error. * Return on success 0, otherwise error.
* *
*****************************************************************************/ ****************************************************************************/
long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask, long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,
unsigned long *aucDefaultGateway, unsigned long *aucDNSServer) unsigned long *aucDefaultGateway, unsigned long *aucDNSServer)
@@ -148,7 +148,7 @@ long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,
return(scRet); return(scRet);
} }
/****************************************************************************** /****************************************************************************
* Name: netapp_timeout_values * Name: netapp_timeout_values
* *
* Description: * Description:
@@ -196,7 +196,7 @@ long netapp_dhcp(unsigned long *aucIP, unsigned long *aucSubnetMask,
* Returned Value: * Returned Value:
* Return on success 0, otherwise error. * Return on success 0, otherwise error.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP, long netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP,
@@ -241,7 +241,7 @@ long netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP,
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_ping_send * Name: netapp_ping_send
* *
* Description: * Description:
@@ -263,7 +263,7 @@ long netapp_timeout_values(unsigned long *aucDHCP, unsigned long *aucARP,
* Returned Value: * Returned Value:
* Return on success 0, otherwise error. * Return on success 0, otherwise error.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long netapp_ping_send(unsigned long *ip, unsigned long ulPingAttempts, long netapp_ping_send(unsigned long *ip, unsigned long ulPingAttempts,
@@ -299,7 +299,7 @@ long netapp_ping_send(unsigned long *ip, unsigned long ulPingAttempts,
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_ping_report * Name: netapp_ping_report
* *
* Description: * Description:
@@ -324,7 +324,7 @@ long netapp_ping_send(unsigned long *ip, unsigned long ulPingAttempts,
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
void netapp_ping_report(void) void netapp_ping_report(void)
@@ -349,7 +349,7 @@ void netapp_ping_report(void)
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_ping_stop * Name: netapp_ping_stop
* *
* Description: * Description:
@@ -361,7 +361,7 @@ void netapp_ping_report(void)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long netapp_ping_stop(void) long netapp_ping_stop(void)
@@ -388,7 +388,7 @@ long netapp_ping_stop(void)
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_ipconfig * Name: netapp_ipconfig
* *
* Description: * Description:
@@ -416,7 +416,7 @@ long netapp_ping_stop(void)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
void netapp_ipconfig(tNetappIpconfigRetArgs * ipconfig) void netapp_ipconfig(tNetappIpconfigRetArgs * ipconfig)
@@ -443,7 +443,7 @@ void netapp_ipconfig(tNetappIpconfigRetArgs * ipconfig)
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_arp_flush * Name: netapp_arp_flush
* *
* Description: * Description:
@@ -455,7 +455,7 @@ void netapp_ipconfig(tNetappIpconfigRetArgs * ipconfig)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long netapp_arp_flush(void) long netapp_arp_flush(void)
@@ -483,7 +483,7 @@ long netapp_arp_flush(void)
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: netapp_set_debug_level * Name: netapp_set_debug_level
* *
* Description: * Description:
@@ -507,7 +507,7 @@ long netapp_arp_flush(void)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long netapp_set_debug_level(unsigned long ulLevel) long netapp_set_debug_level(unsigned long ulLevel)
+22 -22
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* nvmem.c - CC3000 Host Driver Implementation. * nvmem.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Included Files * Included Files
******************************************************************************/ ****************************************************************************/
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
@@ -44,18 +44,18 @@
#include <nuttx/wireless/cc3000/evnt_handler.h> #include <nuttx/wireless/cc3000/evnt_handler.h>
#include "cc3000.h" #include "cc3000.h"
/****************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
******************************************************************************/ ****************************************************************************/
#define NVMEM_READ_PARAMS_LEN (12) #define NVMEM_READ_PARAMS_LEN (12)
#define NVMEM_CREATE_PARAMS_LEN (8) #define NVMEM_CREATE_PARAMS_LEN (8)
#define NVMEM_WRITE_PARAMS_LEN (16) #define NVMEM_WRITE_PARAMS_LEN (16)
/****************************************************************************** /****************************************************************************
* Public Functions * Public Functions
******************************************************************************/ ****************************************************************************/
/****************************************************************************** /****************************************************************************
* Name: nvmem_read * Name: nvmem_read
* *
* Description: * Description:
@@ -79,7 +79,7 @@
* Returned Value: * Returned Value:
* Number of bytes read, otherwise error. * Number of bytes read, otherwise error.
* *
*****************************************************************************/ ****************************************************************************/
signed long nvmem_read(unsigned long ulFileId, unsigned long ulLength, signed long nvmem_read(unsigned long ulFileId, unsigned long ulLength,
unsigned long ulOffset, uint8_t *buff) unsigned long ulOffset, uint8_t *buff)
@@ -120,7 +120,7 @@ signed long nvmem_read(unsigned long ulFileId, unsigned long ulLength,
return ucStatus; return ucStatus;
} }
/****************************************************************************** /****************************************************************************
* Name: nvmem_write * Name: nvmem_write
* *
* Description: * Description:
@@ -141,7 +141,7 @@ signed long nvmem_read(unsigned long ulFileId, unsigned long ulLength,
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
signed long nvmem_write(unsigned long ulFileId, unsigned long ulLength, signed long nvmem_write(unsigned long ulFileId, unsigned long ulLength,
unsigned long ulEntryOffset, uint8_t *buff) unsigned long ulEntryOffset, uint8_t *buff)
@@ -179,7 +179,7 @@ signed long nvmem_write(unsigned long ulFileId, unsigned long ulLength,
return iRes; return iRes;
} }
/****************************************************************************** /****************************************************************************
* Name: nvmem_set_mac_address * Name: nvmem_set_mac_address
* *
* Description: * Description:
@@ -192,14 +192,14 @@ signed long nvmem_write(unsigned long ulFileId, unsigned long ulLength,
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
uint8_t nvmem_set_mac_address(uint8_t *mac) uint8_t nvmem_set_mac_address(uint8_t *mac)
{ {
return nvmem_write(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac); return nvmem_write(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac);
} }
/****************************************************************************** /****************************************************************************
* Name: nvmem_get_mac_address * Name: nvmem_get_mac_address
* *
* Description: * Description:
@@ -212,14 +212,14 @@ uint8_t nvmem_set_mac_address(uint8_t *mac)
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
uint8_t nvmem_get_mac_address(uint8_t *mac) uint8_t nvmem_get_mac_address(uint8_t *mac)
{ {
return nvmem_read(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac); return nvmem_read(NVMEM_MAC_FILEID, MAC_ADDR_LEN, 0, mac);
} }
/****************************************************************************** /****************************************************************************
* Name: nvmem_write_patch * Name: nvmem_write_patch
* *
* Description: * Description:
@@ -236,7 +236,7 @@ uint8_t nvmem_get_mac_address(uint8_t *mac)
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
uint8_t nvmem_write_patch(unsigned long ulFileId, unsigned long spLength, uint8_t nvmem_write_patch(unsigned long ulFileId, unsigned long spLength,
const uint8_t *spData) const uint8_t *spData)
@@ -270,7 +270,7 @@ uint8_t nvmem_write_patch(unsigned long ulFileId, unsigned long spLength,
return status; return status;
} }
/****************************************************************************** /****************************************************************************
* Name: nvmem_read_sp_version * Name: nvmem_read_sp_version
* *
* Description: * Description:
@@ -284,7 +284,7 @@ uint8_t nvmem_write_patch(unsigned long ulFileId, unsigned long spLength,
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
uint8_t nvmem_read_sp_version(uint8_t *patchVer) uint8_t nvmem_read_sp_version(uint8_t *patchVer)
@@ -316,7 +316,7 @@ uint8_t nvmem_read_sp_version(uint8_t *patchVer)
} }
#endif #endif
/****************************************************************************** /****************************************************************************
* Name: nvmem_create_entry * Name: nvmem_create_entry
* *
* Description: * Description:
@@ -336,7 +336,7 @@ uint8_t nvmem_read_sp_version(uint8_t *patchVer)
* Returned Value: * Returned Value:
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
signed long nvmem_create_entry(unsigned long ulFileId, unsigned long ulNewLen) signed long nvmem_create_entry(unsigned long ulFileId, unsigned long ulNewLen)
{ {
+16 -16
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* security.c - CC3000 Host Driver Implementation. * security.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,19 +30,19 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/wireless/cc3000/security.h> #include <nuttx/wireless/cc3000/security.h>
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG #ifndef CC3000_UNENCRYPTED_SMART_CONFIG
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
// foreward sbox // foreward sbox
@@ -98,9 +98,9 @@ const uint8_t Rcon[11] =
uint8_t aexpandedKey[176]; uint8_t aexpandedKey[176];
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
//***************************************************************************** //*****************************************************************************
// //
//! expandKey //! expandKey
@@ -443,7 +443,7 @@ void aes_decr(uint8_t *state, uint8_t *expandedKey)
} }
/***************************************************************************** /****************************************************************************
* Name: aes_encrypt * Name: aes_encrypt
* *
* Description: * Description:
@@ -458,7 +458,7 @@ void aes_decr(uint8_t *state, uint8_t *expandedKey)
* Returned Value * Returned Value
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void aes_encrypt(uint8_t *state, uint8_t *key) void aes_encrypt(uint8_t *state, uint8_t *key)
{ {
@@ -467,7 +467,7 @@ void aes_encrypt(uint8_t *state, uint8_t *key)
aes_encr(state, aexpandedKey); aes_encr(state, aexpandedKey);
} }
/***************************************************************************** /****************************************************************************
* Name: aes_decrypt * Name: aes_decrypt
* *
* Description: * Description:
@@ -482,7 +482,7 @@ void aes_encrypt(uint8_t *state, uint8_t *key)
* Returned Value * Returned Value
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void aes_decrypt(uint8_t *state, uint8_t *key) void aes_decrypt(uint8_t *state, uint8_t *key)
{ {
@@ -490,7 +490,7 @@ void aes_decrypt(uint8_t *state, uint8_t *key)
aes_decr(state, aexpandedKey); aes_decr(state, aexpandedKey);
} }
/***************************************************************************** /****************************************************************************
* Name: aes_read_key * Name: aes_read_key
* *
* Description: * Description:
@@ -503,7 +503,7 @@ void aes_decrypt(uint8_t *state, uint8_t *key)
* Returned Value * Returned Value
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
signed long aes_read_key(uint8_t *key) signed long aes_read_key(uint8_t *key)
{ {
@@ -514,7 +514,7 @@ signed long aes_read_key(uint8_t *key)
return returnValue; return returnValue;
} }
/***************************************************************************** /****************************************************************************
* Name: aes_write_key * Name: aes_write_key
* *
* Description: * Description:
@@ -527,7 +527,7 @@ signed long aes_read_key(uint8_t *key)
* Returned Value * Returned Value
* On success 0, error otherwise. * On success 0, error otherwise.
* *
*****************************************************************************/ ****************************************************************************/
signed long aes_write_key(uint8_t *key) signed long aes_write_key(uint8_t *key)
{ {
+36 -36
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* socket.c - CC3000 Host Driver Implementation. * socket.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <sys/types.h> #include <sys/types.h>
#include <sys/select.h> #include <sys/select.h>
@@ -54,9 +54,9 @@
#include "cc3000drv.h" #include "cc3000drv.h"
#include "cc3000.h" #include "cc3000.h"
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
#ifndef ARRAY_SIZE #ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) # define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -99,7 +99,7 @@ static const int bsd2ti_types[] =
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: socket * Name: socket
* *
* Description: * Description:
@@ -120,7 +120,7 @@ static const int bsd2ti_types[] =
* On success, socket handle that is used for consequent socket * On success, socket handle that is used for consequent socket
* operations. On error, -1 is returned. * operations. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_socket(int domain, int type, int protocol) int cc3000_socket(int domain, int type, int protocol)
{ {
@@ -175,7 +175,7 @@ int cc3000_socket(int domain, int type, int protocol)
return sd; return sd;
} }
/***************************************************************************** /****************************************************************************
* Name: closesocket * Name: closesocket
* *
* Description: * Description:
@@ -187,7 +187,7 @@ int cc3000_socket(int domain, int type, int protocol)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_closesocket(int sockfd) int cc3000_closesocket(int sockfd)
{ {
@@ -205,7 +205,7 @@ int cc3000_closesocket(int sockfd)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: accept, cc3000_do_accept * Name: accept, cc3000_do_accept
* *
* Description: * Description:
@@ -248,7 +248,7 @@ int cc3000_closesocket(int sockfd)
* - On connection pending, SOC_IN_PROGRESS (-2) * - On connection pending, SOC_IN_PROGRESS (-2)
* - On failure, SOC_ERROR (-1) * - On failure, SOC_ERROR (-1)
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_do_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) int cc3000_do_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
{ {
@@ -290,7 +290,7 @@ int cc3000_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: bind * Name: bind
* *
* Description: * Description:
@@ -311,7 +311,7 @@ int cc3000_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) int cc3000_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
{ {
@@ -323,7 +323,7 @@ int cc3000_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: listen * Name: listen
* *
* Description: * Description:
@@ -345,7 +345,7 @@ int cc3000_bind(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_listen(int sockfd, int backlog) int cc3000_listen(int sockfd, int backlog)
{ {
@@ -357,7 +357,7 @@ int cc3000_listen(int sockfd, int backlog)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: connect * Name: connect
* *
* Description: * Description:
@@ -385,7 +385,7 @@ int cc3000_listen(int sockfd, int backlog)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen) int cc3000_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrlen)
{ {
@@ -397,7 +397,7 @@ int cc3000_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrle
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: select * Name: select
* *
* Description: * Description:
@@ -434,7 +434,7 @@ int cc3000_connect(int sockfd, FAR const struct sockaddr *addr, socklen_t addrle
* will return without delay. * will return without delay.
* *exceptfds - return the sockets which closed recently. * *exceptfds - return the sockets which closed recently.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds, int cc3000_select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds,
struct timeval *timeout) struct timeval *timeout)
@@ -450,7 +450,7 @@ int cc3000_select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds,
} }
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
/***************************************************************************** /****************************************************************************
* Name: setsockopt * Name: setsockopt
* *
* Description: * Description:
@@ -496,7 +496,7 @@ int cc3000_select(int nfds, fd_set *readfds, fd_set *writefds,fd_set *exceptfds,
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_setsockopt(int sockfd, int level, int option, int cc3000_setsockopt(int sockfd, int level, int option,
FAR const void *value, socklen_t value_len) FAR const void *value, socklen_t value_len)
@@ -510,7 +510,7 @@ int cc3000_setsockopt(int sockfd, int level, int option,
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: getsockopt * Name: getsockopt
* *
* Description: * Description:
@@ -556,7 +556,7 @@ int cc3000_setsockopt(int sockfd, int level, int option,
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_getsockopt(int sockfd, int level, int option, FAR void *value, int cc3000_getsockopt(int sockfd, int level, int option, FAR void *value,
FAR socklen_t *value_len) FAR socklen_t *value_len)
@@ -569,7 +569,7 @@ int cc3000_getsockopt(int sockfd, int level, int option, FAR void *value,
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: recv * Name: recv
* *
* Description: * Description:
@@ -589,7 +589,7 @@ int cc3000_getsockopt(int sockfd, int level, int option, FAR void *value,
* Return the number of bytes received, or -1 if an error * Return the number of bytes received, or -1 if an error
* occurred * occurred
* *
*****************************************************************************/ ****************************************************************************/
ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags) ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags)
{ {
@@ -619,7 +619,7 @@ ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: recvfrom * Name: recvfrom
* *
* Description: * Description:
@@ -646,7 +646,7 @@ ssize_t cc3000_recv(int sockfd, FAR void *buf, size_t len, int flags)
* Return the number of bytes received, or -1 if an error * Return the number of bytes received, or -1 if an error
* occurred * occurred
* *
*****************************************************************************/ ****************************************************************************/
ssize_t cc3000_recvfrom(int sockfd, FAR void *buf, size_t len, int flags, ssize_t cc3000_recvfrom(int sockfd, FAR void *buf, size_t len, int flags,
FAR struct sockaddr *from, FAR socklen_t *fromlen) FAR struct sockaddr *from, FAR socklen_t *fromlen)
@@ -672,7 +672,7 @@ ssize_t cc3000_recvfrom(int sockfd, FAR void *buf, size_t len, int flags,
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: send * Name: send
* *
* Description: * Description:
@@ -692,7 +692,7 @@ ssize_t cc3000_recvfrom(int sockfd, FAR void *buf, size_t len, int flags,
* Return the number of bytes transmitted, or -1 if an * Return the number of bytes transmitted, or -1 if an
* error occurred * error occurred
* *
*****************************************************************************/ ****************************************************************************/
ssize_t cc3000_send(int sockfd, FAR const void *buf, size_t len, int flags) ssize_t cc3000_send(int sockfd, FAR const void *buf, size_t len, int flags)
{ {
@@ -704,7 +704,7 @@ ssize_t cc3000_send(int sockfd, FAR const void *buf, size_t len, int flags)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: sendto * Name: sendto
* *
* Description: * Description:
@@ -728,7 +728,7 @@ ssize_t cc3000_send(int sockfd, FAR const void *buf, size_t len, int flags)
* Return the number of bytes transmitted, or -1 if an * Return the number of bytes transmitted, or -1 if an
* error occurred * error occurred
* *
*****************************************************************************/ ****************************************************************************/
ssize_t cc3000_sendto(int sockfd, FAR const void *buf, size_t len, int flags, ssize_t cc3000_sendto(int sockfd, FAR const void *buf, size_t len, int flags,
FAR const struct sockaddr *to, socklen_t tolen) FAR const struct sockaddr *to, socklen_t tolen)
@@ -741,7 +741,7 @@ ssize_t cc3000_sendto(int sockfd, FAR const void *buf, size_t len, int flags,
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: gethostbyname * Name: gethostbyname
* *
* Description: * Description:
@@ -762,7 +762,7 @@ ssize_t cc3000_sendto(int sockfd, FAR const void *buf, size_t len, int flags,
* Returned Value: * Returned Value:
* On success, positive is returned. On error, negative is returned * On success, positive is returned. On error, negative is returned
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
// TODO: Standard is struct hostent *gethostbyname(const char *name); // TODO: Standard is struct hostent *gethostbyname(const char *name);
@@ -777,7 +777,7 @@ int cc3000_gethostbyname(char * hostname, uint16_t usNameLen, unsigned long* out
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: mdnsAdvertiser * Name: mdnsAdvertiser
* *
* Description: * Description:
@@ -793,7 +793,7 @@ int cc3000_gethostbyname(char * hostname, uint16_t usNameLen, unsigned long* out
* On success, zero is returned, return SOC_ERROR if socket was not * On success, zero is returned, return SOC_ERROR if socket was not
* opened successfully, or if an error occurred. * opened successfully, or if an error occurred.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_mdnsadvertiser(uint16_t mdnsEnabled, char *deviceServiceName, int cc3000_mdnsadvertiser(uint16_t mdnsEnabled, char *deviceServiceName,
uint16_t deviceServiceNameLength) uint16_t deviceServiceNameLength)
+43 -43
View File
@@ -33,11 +33,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <sys/time.h> #include <sys/time.h>
#include <stdio.h> #include <stdio.h>
@@ -51,9 +51,9 @@
#include <nuttx/wireless/cc3000/evnt_handler.h> #include <nuttx/wireless/cc3000/evnt_handler.h>
#include <nuttx/wireless/cc3000/netapp.h> #include <nuttx/wireless/cc3000/netapp.h>
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/* Enable this flag if and only if you must comply with BSD socket close() /* Enable this flag if and only if you must comply with BSD socket close()
* function * function
@@ -101,10 +101,10 @@
#define MDNS_DEVICE_SERVICE_MAX_LENGTH (32) #define MDNS_DEVICE_SERVICE_MAX_LENGTH (32)
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: HostFlowControlConsumeBuff * Name: HostFlowControlConsumeBuff
* *
* Input Parameters: * Input Parameters:
@@ -121,7 +121,7 @@
* becomes available, else return immediately with correct status * becomes available, else return immediately with correct status
* regarding the buffers available. * regarding the buffers available.
* *
*****************************************************************************/ ****************************************************************************/
int HostFlowControlConsumeBuff(int sd) int HostFlowControlConsumeBuff(int sd)
{ {
@@ -197,7 +197,7 @@ int HostFlowControlConsumeBuff(int sd)
#endif #endif
} }
/***************************************************************************** /****************************************************************************
* Name: socket * Name: socket
* *
* Decription: * Decription:
@@ -218,7 +218,7 @@ int HostFlowControlConsumeBuff(int sd)
* On success, socket handle that is used for consequent socket * On success, socket handle that is used for consequent socket
* operations. On error, -1 is returned. * operations. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_socket_impl(long domain, long type, long protocol) int cc3000_socket_impl(long domain, long type, long protocol)
{ {
@@ -250,7 +250,7 @@ int cc3000_socket_impl(long domain, long type, long protocol)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: closesocket * Name: closesocket
* *
* Decription: * Decription:
@@ -262,7 +262,7 @@ int cc3000_socket_impl(long domain, long type, long protocol)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_closesocket_impl(long sd) long cc3000_closesocket_impl(long sd)
{ {
@@ -296,7 +296,7 @@ long cc3000_closesocket_impl(long sd)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: accept * Name: accept
* *
* Decription: * Decription:
@@ -339,7 +339,7 @@ long cc3000_closesocket_impl(long sd)
* - On connection pending, SOC_IN_PROGRESS (-2) * - On connection pending, SOC_IN_PROGRESS (-2)
* - On failure, SOC_ERROR (-1) * - On failure, SOC_ERROR (-1)
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_accept_impl(long sd, struct sockaddr *addr, socklen_t *addrlen) long cc3000_accept_impl(long sd, struct sockaddr *addr, socklen_t *addrlen)
{ {
@@ -385,7 +385,7 @@ long cc3000_accept_impl(long sd, struct sockaddr *addr, socklen_t *addrlen)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: bind * Name: bind
* *
* Decription: * Decription:
@@ -406,7 +406,7 @@ long cc3000_accept_impl(long sd, struct sockaddr *addr, socklen_t *addrlen)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_bind_impl(long sd, const struct sockaddr *addr, socklen_t addrlen) long cc3000_bind_impl(long sd, const struct sockaddr *addr, socklen_t addrlen)
{ {
@@ -439,7 +439,7 @@ long cc3000_bind_impl(long sd, const struct sockaddr *addr, socklen_t addrlen)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: listen * Name: listen
* *
* Decription: * Decription:
@@ -461,7 +461,7 @@ long cc3000_bind_impl(long sd, const struct sockaddr *addr, socklen_t addrlen)
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned. * On success, zero is returned. On error, -1 is returned.
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_listen_impl(long sd, long backlog) long cc3000_listen_impl(long sd, long backlog)
{ {
@@ -490,7 +490,7 @@ long cc3000_listen_impl(long sd, long backlog)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: gethostbyname * Name: gethostbyname
* *
* Decription: * Decription:
@@ -511,7 +511,7 @@ long cc3000_listen_impl(long sd, long backlog)
* Returned Value: * Returned Value:
* On success, positive is returned. On error, negative is returned * On success, positive is returned. On error, negative is returned
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
int cc3000_gethostbyname_impl(char * hostname, uint16_t usNameLen, unsigned long* out_ip_addr) int cc3000_gethostbyname_impl(char * hostname, uint16_t usNameLen, unsigned long* out_ip_addr)
@@ -552,7 +552,7 @@ int cc3000_gethostbyname_impl(char * hostname, uint16_t usNameLen, unsigned long
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: connect * Name: connect
* *
* Decription: * Decription:
@@ -580,7 +580,7 @@ int cc3000_gethostbyname_impl(char * hostname, uint16_t usNameLen, unsigned long
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
long cc3000_connect_impl(long sd, const struct sockaddr *addr, socklen_t addrlen) long cc3000_connect_impl(long sd, const struct sockaddr *addr, socklen_t addrlen)
{ {
@@ -612,7 +612,7 @@ long cc3000_connect_impl(long sd, const struct sockaddr *addr, socklen_t addrlen
return (long)ret; return (long)ret;
} }
/***************************************************************************** /****************************************************************************
* Name: select * Name: select
* *
* Decription: * Decription:
@@ -649,7 +649,7 @@ long cc3000_connect_impl(long sd, const struct sockaddr *addr, socklen_t addrlen
* will return without delay. * will return without delay.
* *exceptsds - return the sockets which closed recently. * *exceptsds - return the sockets which closed recently.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_select_impl(long nfds, TICC3000fd_set *readsds, TICC3000fd_set *writesds, int cc3000_select_impl(long nfds, TICC3000fd_set *readsds, TICC3000fd_set *writesds,
TICC3000fd_set *exceptsds, struct timeval *timeout) TICC3000fd_set *exceptsds, struct timeval *timeout)
@@ -732,7 +732,7 @@ int cc3000_select_impl(long nfds, TICC3000fd_set *readsds, TICC3000fd_set *write
} }
} }
/***************************************************************************** /****************************************************************************
* Name: setsockopt * Name: setsockopt
* *
* Decription: * Decription:
@@ -778,7 +778,7 @@ int cc3000_select_impl(long nfds, TICC3000fd_set *readsds, TICC3000fd_set *write
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
int cc3000_setsockopt_impl(long sd, long level, long optname, const void *optval, socklen_t optlen) int cc3000_setsockopt_impl(long sd, long level, long optname, const void *optval, socklen_t optlen)
@@ -819,7 +819,7 @@ int cc3000_setsockopt_impl(long sd, long level, long optname, const void *optval
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: getsockopt * Name: getsockopt
* *
* Decription: * Decription:
@@ -865,7 +865,7 @@ int cc3000_setsockopt_impl(long sd, long level, long optname, const void *optval
* Returned Value: * Returned Value:
* On success, zero is returned. On error, -1 is returned * On success, zero is returned. On error, -1 is returned
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_getsockopt_impl(long sd, long level, long optname, void *optval, socklen_t *optlen) int cc3000_getsockopt_impl(long sd, long level, long optname, void *optval, socklen_t *optlen)
{ {
@@ -903,7 +903,7 @@ int cc3000_getsockopt_impl(long sd, long level, long optname, void *optval, sock
} }
} }
/***************************************************************************** /****************************************************************************
* Name: simple_link_recv * Name: simple_link_recv
* *
* Input Parameters: * Input Parameters:
@@ -925,7 +925,7 @@ int cc3000_getsockopt_impl(long sd, long level, long optname, void *optval, sock
* excess bytes may be discarded depending on the type of * excess bytes may be discarded depending on the type of
* socket the message is received from * socket the message is received from
* *
*****************************************************************************/ ****************************************************************************/
int simple_link_recv(long sd, void *buf, long len, long flags, struct sockaddr *from, int simple_link_recv(long sd, void *buf, long len, long flags, struct sockaddr *from,
socklen_t *fromlen, long opcode) socklen_t *fromlen, long opcode)
@@ -965,7 +965,7 @@ int simple_link_recv(long sd, void *buf, long len, long flags, struct sockaddr *
return tSocketReadEvent.iNumberOfBytes; return tSocketReadEvent.iNumberOfBytes;
} }
/***************************************************************************** /****************************************************************************
* Name: recv * Name: recv
* *
* Decription: * Decription:
@@ -985,14 +985,14 @@ int simple_link_recv(long sd, void *buf, long len, long flags, struct sockaddr *
* Return the number of bytes received, or -1 if an error * Return the number of bytes received, or -1 if an error
* occurred * occurred
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_recv_impl(long sd, void *buf, long len, long flags) int cc3000_recv_impl(long sd, void *buf, long len, long flags)
{ {
return(simple_link_recv(sd, buf, len, flags, NULL, NULL, HCI_CMND_RECV)); return(simple_link_recv(sd, buf, len, flags, NULL, NULL, HCI_CMND_RECV));
} }
/***************************************************************************** /****************************************************************************
* Name: recvfrom * Name: recvfrom
* *
* Decription: * Decription:
@@ -1019,7 +1019,7 @@ int cc3000_recv_impl(long sd, void *buf, long len, long flags)
* Return the number of bytes received, or -1 if an error * Return the number of bytes received, or -1 if an error
* occurred * occurred
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_recvfrom_impl(long sd, void *buf, long len, long flags, struct sockaddr *from, int cc3000_recvfrom_impl(long sd, void *buf, long len, long flags, struct sockaddr *from,
socklen_t *fromlen) socklen_t *fromlen)
@@ -1028,7 +1028,7 @@ int cc3000_recvfrom_impl(long sd, void *buf, long len, long flags, struct sockad
HCI_CMND_RECVFROM)); HCI_CMND_RECVFROM));
} }
/***************************************************************************** /****************************************************************************
* Name: simple_link_send * Name: simple_link_send
* *
* Input Parameters: * Input Parameters:
@@ -1049,7 +1049,7 @@ int cc3000_recvfrom_impl(long sd, void *buf, long len, long flags, struct sockad
* This function is used to transmit a message to another * This function is used to transmit a message to another
* socket * socket
* *
*****************************************************************************/ ****************************************************************************/
int simple_link_send(long sd, const void *buf, long len, long flags, int simple_link_send(long sd, const void *buf, long len, long flags,
const struct sockaddr *to, long tolen, long opcode) const struct sockaddr *to, long tolen, long opcode)
@@ -1144,7 +1144,7 @@ int simple_link_send(long sd, const void *buf, long len, long flags,
return len; return len;
} }
/***************************************************************************** /****************************************************************************
* Name: send * Name: send
* *
* Decription: * Decription:
@@ -1164,14 +1164,14 @@ int simple_link_send(long sd, const void *buf, long len, long flags,
* Return the number of bytes transmitted, or -1 if an * Return the number of bytes transmitted, or -1 if an
* error occurred * error occurred
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_send_impl(long sd, const void *buf, long len, long flags) int cc3000_send_impl(long sd, const void *buf, long len, long flags)
{ {
return(simple_link_send(sd, buf, len, flags, NULL, 0, HCI_CMND_SEND)); return(simple_link_send(sd, buf, len, flags, NULL, 0, HCI_CMND_SEND));
} }
/***************************************************************************** /****************************************************************************
* Name: sendto * Name: sendto
* *
* Decription: * Decription:
@@ -1195,7 +1195,7 @@ int cc3000_send_impl(long sd, const void *buf, long len, long flags)
* Return the number of bytes transmitted, or -1 if an * Return the number of bytes transmitted, or -1 if an
* error occurred * error occurred
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_sendto_impl(long sd, const void *buf, long len, long flags, const struct sockaddr *to, int cc3000_sendto_impl(long sd, const void *buf, long len, long flags, const struct sockaddr *to,
socklen_t tolen) socklen_t tolen)
@@ -1203,7 +1203,7 @@ int cc3000_sendto_impl(long sd, const void *buf, long len, long flags, const str
return(simple_link_send(sd, buf, len, flags, to, tolen, HCI_CMND_SENDTO)); return(simple_link_send(sd, buf, len, flags, to, tolen, HCI_CMND_SENDTO));
} }
/***************************************************************************** /****************************************************************************
* Name: mdnsAdvertiser * Name: mdnsAdvertiser
* *
* Decription: * Decription:
@@ -1219,7 +1219,7 @@ int cc3000_sendto_impl(long sd, const void *buf, long len, long flags, const str
* On success, zero is returned, return SOC_ERROR if socket was not * On success, zero is returned, return SOC_ERROR if socket was not
* opened successfully, or if an error occurred. * opened successfully, or if an error occurred.
* *
*****************************************************************************/ ****************************************************************************/
int cc3000_mdnsadvertiser_impl(uint16_t mdnsEnabled, char * deviceServiceName, int cc3000_mdnsadvertiser_impl(uint16_t mdnsEnabled, char * deviceServiceName,
uint16_t deviceServiceNameLength) uint16_t deviceServiceNameLength)
+48 -48
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* wlan.c - CC3000 Host Driver Implementation. * wlan.c - CC3000 Host Driver Implementation.
* Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
* *
@@ -30,11 +30,11 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
@@ -53,9 +53,9 @@
#include "cc3000.h" #include "cc3000.h"
#include "cc3000drv.h" #include "cc3000drv.h"
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
#define SMART_CONFIG_PROFILE_SIZE 67 /* 67 = 32 (max ssid) + 32 (max key) + #define SMART_CONFIG_PROFILE_SIZE 67 /* 67 = 32 (max ssid) + 32 (max key) +
* 1 (SSID length) + 1 (security type) + * 1 (SSID length) + 1 (security type) +
@@ -102,9 +102,9 @@
* Private Variables * Private Variables
****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Data * Public Data
*****************************************************************************/ ****************************************************************************/
volatile sSimplLinkInformation tSLInformation; volatile sSimplLinkInformation tSLInformation;
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG #ifndef CC3000_UNENCRYPTED_SMART_CONFIG
@@ -112,10 +112,10 @@ uint8_t akey[AES128_KEY_SIZE];
uint8_t profileArray[SMART_CONFIG_PROFILE_SIZE]; uint8_t profileArray[SMART_CONFIG_PROFILE_SIZE];
#endif /* CC3000_UNENCRYPTED_SMART_CONFIG */ #endif /* CC3000_UNENCRYPTED_SMART_CONFIG */
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: SimpleLink_Init_Start * Name: SimpleLink_Init_Start
* *
* Input Parameters: * Input Parameters:
@@ -132,7 +132,7 @@ uint8_t profileArray[SMART_CONFIG_PROFILE_SIZE];
* Description: * Description:
* Send HCI_CMND_SIMPLE_LINK_START to CC3000 * Send HCI_CMND_SIMPLE_LINK_START to CC3000
* *
*****************************************************************************/ ****************************************************************************/
static void SimpleLink_Init_Start(uint16_t usPatchesAvailableAtHost) static void SimpleLink_Init_Start(uint16_t usPatchesAvailableAtHost)
{ {
@@ -157,7 +157,7 @@ static void SimpleLink_Init_Start(uint16_t usPatchesAvailableAtHost)
SimpleLinkWaitEvent(HCI_CMND_SIMPLE_LINK_START, 0); SimpleLinkWaitEvent(HCI_CMND_SIMPLE_LINK_START, 0);
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_init * Name: wlan_init
* *
* Input Parameters: * Input Parameters:
@@ -193,7 +193,7 @@ static void SimpleLink_Init_Start(uint16_t usPatchesAvailableAtHost)
* *
* WARNING: This function must be called before ANY other wlan driver function * WARNING: This function must be called before ANY other wlan driver function
* *
*****************************************************************************/ ****************************************************************************/
void wlan_init(size_t max_tx_len, void wlan_init(size_t max_tx_len,
tWlanCB sWlanCB, tWlanCB sWlanCB,
@@ -235,7 +235,7 @@ void wlan_init(size_t max_tx_len,
} }
} }
/***************************************************************************** /****************************************************************************
* Name: SpiReceiveHandler * Name: SpiReceiveHandler
* *
* Input Parameters: * Input Parameters:
@@ -248,7 +248,7 @@ void wlan_init(size_t max_tx_len,
* The function triggers Received event/data processing. It is * The function triggers Received event/data processing. It is
* called from the SPI library to receive the data * called from the SPI library to receive the data
* *
*****************************************************************************/ ****************************************************************************/
void SpiReceiveHandler(void *pvBuffer) void SpiReceiveHandler(void *pvBuffer)
{ {
@@ -266,7 +266,7 @@ void SpiReceiveHandler(void *pvBuffer)
hci_unsolicited_event_handler(); hci_unsolicited_event_handler();
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_start * Name: wlan_start
* *
* Input Parameters: * Input Parameters:
@@ -291,7 +291,7 @@ void SpiReceiveHandler(void *pvBuffer)
* WARNING: This function must be called after wlan_init and before any * WARNING: This function must be called after wlan_init and before any
* other wlan API * other wlan API
* *
*****************************************************************************/ ****************************************************************************/
void wlan_start(uint16_t usPatchesAvailableAtHost) void wlan_start(uint16_t usPatchesAvailableAtHost)
{ {
@@ -321,7 +321,7 @@ void wlan_start(uint16_t usPatchesAvailableAtHost)
cc3000_lib_unlock(); cc3000_lib_unlock();
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_get_buffer * Name: wlan_get_buffer
* *
* Input Parameters: * Input Parameters:
@@ -330,14 +330,14 @@ void wlan_start(uint16_t usPatchesAvailableAtHost)
* Returned Value: * Returned Value:
* None * None
* *
*****************************************************************************/ ****************************************************************************/
void wlan_get_buffer(wlan_buffer_desc *pdes) void wlan_get_buffer(wlan_buffer_desc *pdes)
{ {
*pdes = tSLInformation.usrBuffer; *pdes = tSLInformation.usrBuffer;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_stop * Name: wlan_stop
* *
* Input Parameters: * Input Parameters:
@@ -349,7 +349,7 @@ void wlan_get_buffer(wlan_buffer_desc *pdes)
* Description: * Description:
* Stop WLAN device by putting it into reset state. * Stop WLAN device by putting it into reset state.
* *
*****************************************************************************/ ****************************************************************************/
void wlan_stop(void) void wlan_stop(void)
{ {
@@ -358,7 +358,7 @@ void wlan_stop(void)
cc3000_lib_unlock(); cc3000_lib_unlock();
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_connect * Name: wlan_connect
* *
* Input Parameters: * Input Parameters:
@@ -388,7 +388,7 @@ void wlan_stop(void)
* type WEP, please confirm that the key is set as ASCII and not * type WEP, please confirm that the key is set as ASCII and not
* as HEX. * as HEX.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long wlan_connect(unsigned long ulSecType, FAR const char *ssid, long wlan_connect(unsigned long ulSecType, FAR const char *ssid,
@@ -489,7 +489,7 @@ long wlan_connect(FAR const char *ssid, long ssid_len)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: wlan_disconnect * Name: wlan_disconnect
* *
* Input Parameters: * Input Parameters:
@@ -501,7 +501,7 @@ long wlan_connect(FAR const char *ssid, long ssid_len)
* Description: * Description:
* Disconnect connection from AP. * Disconnect connection from AP.
* *
*****************************************************************************/ ****************************************************************************/
long wlan_disconnect(void) long wlan_disconnect(void)
{ {
@@ -525,7 +525,7 @@ long wlan_disconnect(void)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_ioctl_set_connection_policy * Name: wlan_ioctl_set_connection_policy
* *
* Input Parameters: * Input Parameters:
@@ -555,7 +555,7 @@ long wlan_disconnect(void)
* enabled, the device will try to connect to any AP. * enabled, the device will try to connect to any AP.
* * Note that the policy settings are stored in the CC3000 NVMEM. * * Note that the policy settings are stored in the CC3000 NVMEM.
* *
*****************************************************************************/ ****************************************************************************/
long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap, long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap,
unsigned long ulShouldUseFastConnect, unsigned long ulShouldUseFastConnect,
@@ -590,7 +590,7 @@ long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap,
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_add_profile * Name: wlan_add_profile
* *
* Input Parameters: * Input Parameters:
@@ -616,7 +616,7 @@ long wlan_ioctl_set_connection_policy(unsigned long should_connect_to_open_ap,
* profile based on security policy, signal strength, etc * profile based on security policy, signal strength, etc
* parameters. All the profiles are stored in CC3000 NVMEM. * parameters. All the profiles are stored in CC3000 NVMEM.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long wlan_add_profile(unsigned long ulSecType, uint8_t *ucSsid, long wlan_add_profile(unsigned long ulSecType, uint8_t *ucSsid,
@@ -756,7 +756,7 @@ long wlan_add_profile(unsigned long ulSecType, uint8_t * ucSsid, uint8_t ulSsidL
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: wlan_ioctl_del_profile * Name: wlan_ioctl_del_profile
* *
* Input Parameters: * Input Parameters:
@@ -770,7 +770,7 @@ long wlan_add_profile(unsigned long ulSecType, uint8_t * ucSsid, uint8_t ulSsidL
* *
* @Note In order to delete all stored profile, set index to 255. * @Note In order to delete all stored profile, set index to 255.
* *
*****************************************************************************/ ****************************************************************************/
long wlan_ioctl_del_profile(unsigned long ulIndex) long wlan_ioctl_del_profile(unsigned long ulIndex)
{ {
@@ -802,7 +802,7 @@ long wlan_ioctl_del_profile(unsigned long ulIndex)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_ioctl_get_scan_results * Name: wlan_ioctl_get_scan_results
* *
* Input Parameters: * Input Parameters:
@@ -833,7 +833,7 @@ long wlan_ioctl_del_profile(unsigned long ulIndex)
* *
* NOTE: scan_timeout, is not supported on this version. * NOTE: scan_timeout, is not supported on this version.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout, uint8_t *ucResults) long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout, uint8_t *ucResults)
@@ -865,7 +865,7 @@ long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout, uint8_t *ucResults
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: wlan_ioctl_set_scan_params * Name: wlan_ioctl_set_scan_params
* *
* Input Parameters: * Input Parameters:
@@ -900,7 +900,7 @@ long wlan_ioctl_get_scan_results(unsigned long ulScanTimeout, uint8_t *ucResults
* *
* @Note uiDefaultTxPower, is not supported on this version. * @Note uiDefaultTxPower, is not supported on this version.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long wlan_ioctl_set_scan_params(unsigned long uiEnable, long wlan_ioctl_set_scan_params(unsigned long uiEnable,
@@ -950,7 +950,7 @@ long wlan_ioctl_set_scan_params(unsigned long uiEnable,
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: wlan_set_event_mask * Name: wlan_set_event_mask
* *
* Input Parameters: * Input Parameters:
@@ -972,7 +972,7 @@ long wlan_ioctl_set_scan_params(unsigned long uiEnable,
* Mask event according to bit mask. In case that event is * Mask event according to bit mask. In case that event is
* masked (1), the device will not send the masked event to host. * masked (1), the device will not send the masked event to host.
* *
*****************************************************************************/ ****************************************************************************/
long wlan_set_event_mask(unsigned long ulMask) long wlan_set_event_mask(unsigned long ulMask)
{ {
@@ -1025,7 +1025,7 @@ long wlan_set_event_mask(unsigned long ulMask)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_ioctl_statusget * Name: wlan_ioctl_statusget
* *
* Input Parameters: * Input Parameters:
@@ -1038,7 +1038,7 @@ long wlan_set_event_mask(unsigned long ulMask)
* Description: * Description:
* get wlan status: disconnected, scanning, connecting or connected * get wlan status: disconnected, scanning, connecting or connected
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_TINY_DRIVER #ifndef CC3000_TINY_DRIVER
long wlan_ioctl_statusget(void) long wlan_ioctl_statusget(void)
@@ -1064,7 +1064,7 @@ long wlan_ioctl_statusget(void)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: wlan_smart_config_start * Name: wlan_smart_config_start
* *
* Input Parameters: * Input Parameters:
@@ -1083,7 +1083,7 @@ long wlan_ioctl_statusget(void)
* @Note An asynchronous event - Smart Config Done will be generated as soon * @Note An asynchronous event - Smart Config Done will be generated as soon
* as the process finishes successfully. * as the process finishes successfully.
* *
*****************************************************************************/ ****************************************************************************/
long wlan_smart_config_start(unsigned long algoEncryptedFlag) long wlan_smart_config_start(unsigned long algoEncryptedFlag)
{ {
@@ -1112,7 +1112,7 @@ long wlan_smart_config_start(unsigned long algoEncryptedFlag)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_smart_config_stop * Name: wlan_smart_config_stop
* *
* Input Parameters: * Input Parameters:
@@ -1124,7 +1124,7 @@ long wlan_smart_config_start(unsigned long algoEncryptedFlag)
* Description: * Description:
* Stop the acquire profile procedure * Stop the acquire profile procedure
* *
*****************************************************************************/ ****************************************************************************/
long wlan_smart_config_stop(void) long wlan_smart_config_stop(void)
{ {
@@ -1146,7 +1146,7 @@ long wlan_smart_config_stop(void)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_smart_config_set_prefix * Name: wlan_smart_config_set_prefix
* *
* Input Parameters: * Input Parameters:
@@ -1161,7 +1161,7 @@ long wlan_smart_config_stop(void)
* *
* @Note The prefix is stored in CC3000 NVMEM * @Note The prefix is stored in CC3000 NVMEM
* *
*****************************************************************************/ ****************************************************************************/
long wlan_smart_config_set_prefix(char* cNewPrefix) long wlan_smart_config_set_prefix(char* cNewPrefix)
{ {
@@ -1203,7 +1203,7 @@ long wlan_smart_config_set_prefix(char* cNewPrefix)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: wlan_smart_config_process * Name: wlan_smart_config_process
* *
* Input Parameters: * Input Parameters:
@@ -1218,7 +1218,7 @@ long wlan_smart_config_set_prefix(char* cNewPrefix)
* The encrypted data is decrypted and stored as a profile. * The encrypted data is decrypted and stored as a profile.
* behavior is as defined by connection policy. * behavior is as defined by connection policy.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CC3000_UNENCRYPTED_SMART_CONFIG #ifndef CC3000_UNENCRYPTED_SMART_CONFIG
long wlan_smart_config_process() long wlan_smart_config_process()
+8 -8
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* libc/stdlib/lib_bsearch.c * libc/stdlib/lib_bsearch.c
* *
* Copyright (c) 1990, 1993 * Copyright (c) 1990, 1993
@@ -32,20 +32,20 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <stdlib.h> #include <stdlib.h>
#include <assert.h> #include <assert.h>
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: bsearch * Name: bsearch
* *
* Description: * Description:
@@ -101,7 +101,7 @@
* when 'lim' is 4, we still looked at item 2, so we have to make 'lim' * when 'lim' is 4, we still looked at item 2, so we have to make 'lim'
* 3, then halve, obtaining 1, so that we will only look at item 3. * 3, then halve, obtaining 1, so that we will only look at item 3.
* *
*****************************************************************************/ ****************************************************************************/
FAR void *bsearch(FAR const void *key, FAR const void *base, size_t nel, FAR void *bsearch(FAR const void *key, FAR const void *base, size_t nel,
size_t width, CODE int (*compar)(FAR const void *, size_t width, CODE int (*compar)(FAR const void *,
+3 -3
View File
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -44,7 +44,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_ARCH_STRCMP #ifndef CONFIG_ARCH_STRCMP
int strcasecmp(const char *cs, const char *ct) int strcasecmp(const char *cs, const char *ct)
+3 -3
View File
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -43,7 +43,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_ARCH_STRCMP #ifndef CONFIG_ARCH_STRCMP
int strcmp(const char *cs, const char *ct) int strcmp(const char *cs, const char *ct)
+4 -4
View File
@@ -31,15 +31,15 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Compilation Switches * Compilation Switches
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -49,7 +49,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_ARCH_STRNCASECMP #ifndef CONFIG_ARCH_STRNCASECMP
int strncasecmp(const char *cs, const char *ct, size_t nb) int strncasecmp(const char *cs, const char *ct, size_t nb)
+4 -4
View File
@@ -31,15 +31,15 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Compilation Switches * Compilation Switches
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
#include <sys/types.h> #include <sys/types.h>
@@ -47,7 +47,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_ARCH_STRNCMP #ifndef CONFIG_ARCH_STRNCMP
int strncmp(const char *cs, const char *ct, size_t nb) int strncmp(const char *cs, const char *ct, size_t nb)
+32 -32
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_childstatus.c * sched/group/group_childstatus.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -48,9 +48,9 @@
#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) #if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS)
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/* Note that there cannot be more that CONFIG_MAX_TASKS tasks in total. /* Note that there cannot be more that CONFIG_MAX_TASKS tasks in total.
* However, the number of child status structures may need to be significantly * However, the number of child status structures may need to be significantly
* larger because this number includes the maximum number of tasks that are * larger because this number includes the maximum number of tasks that are
@@ -70,9 +70,9 @@
# undef CONFIG_DEBUG_CHILDSTATUS # undef CONFIG_DEBUG_CHILDSTATUS
#endif #endif
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/* Globals are maintained in a structure to minimize name collisions. */ /* Globals are maintained in a structure to minimize name collisions. */
struct child_pool_s struct child_pool_s
@@ -81,17 +81,17 @@ struct child_pool_s
FAR struct child_status_s *freelist; FAR struct child_status_s *freelist;
}; };
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
static struct child_pool_s g_child_pool; static struct child_pool_s g_child_pool;
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_dumpchildren * Name: group_dumpchildren
* *
* Description: * Description:
@@ -106,7 +106,7 @@ static struct child_pool_s g_child_pool;
* Assumptions: * Assumptions:
* Called early in initialization. No special precautions are required. * Called early in initialization. No special precautions are required.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_DEBUG_CHILDSTATUS #ifdef CONFIG_DEBUG_CHILDSTATUS
static void group_dumpchildren(FAR struct task_group_s *group, static void group_dumpchildren(FAR struct task_group_s *group,
@@ -126,11 +126,11 @@ static void group_dumpchildren(FAR struct task_group_s *group,
# define group_dumpchildren(t,m) # define group_dumpchildren(t,m)
#endif #endif
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: task_initialize * Name: task_initialize
* *
* Description: * Description:
@@ -146,7 +146,7 @@ static void group_dumpchildren(FAR struct task_group_s *group,
* Assumptions: * Assumptions:
* Called early in initialization. No special precautions are required. * Called early in initialization. No special precautions are required.
* *
*****************************************************************************/ ****************************************************************************/
void task_initialize(void) void task_initialize(void)
{ {
@@ -166,7 +166,7 @@ void task_initialize(void)
} }
} }
/***************************************************************************** /****************************************************************************
* Name: group_allocchild * Name: group_allocchild
* *
* Description: * Description:
@@ -184,7 +184,7 @@ void task_initialize(void)
* Called during task creation in a safe context. No special precautions * Called during task creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
FAR struct child_status_s *group_allocchild(void) FAR struct child_status_s *group_allocchild(void)
{ {
@@ -202,7 +202,7 @@ FAR struct child_status_s *group_allocchild(void)
return ret; return ret;
} }
/***************************************************************************** /****************************************************************************
* Name: group_freechild * Name: group_freechild
* *
* Description: * Description:
@@ -218,7 +218,7 @@ FAR struct child_status_s *group_allocchild(void)
* Called during task creation in a safe context. No special precautions * Called during task creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
void group_freechild(FAR struct child_status_s *child) void group_freechild(FAR struct child_status_s *child)
{ {
@@ -231,7 +231,7 @@ void group_freechild(FAR struct child_status_s *child)
} }
} }
/***************************************************************************** /****************************************************************************
* Name: group_addchild * Name: group_addchild
* *
* Description: * Description:
@@ -248,7 +248,7 @@ void group_freechild(FAR struct child_status_s *child)
* Called during task creation processing in a safe context. No special * Called during task creation processing in a safe context. No special
* precautions are required here. * precautions are required here.
* *
*****************************************************************************/ ****************************************************************************/
void group_addchild(FAR struct task_group_s *group, void group_addchild(FAR struct task_group_s *group,
FAR struct child_status_s *child) FAR struct child_status_s *child)
@@ -261,7 +261,7 @@ void group_addchild(FAR struct task_group_s *group,
group_dumpchildren(group, "group_addchild"); group_dumpchildren(group, "group_addchild");
} }
/***************************************************************************** /****************************************************************************
* Name: group_findchild * Name: group_findchild
* *
* Description: * Description:
@@ -281,7 +281,7 @@ void group_addchild(FAR struct task_group_s *group,
* Called during SIGCHLD processing in a safe context. No special precautions * Called during SIGCHLD processing in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
FAR struct child_status_s *group_findchild(FAR struct task_group_s *group, FAR struct child_status_s *group_findchild(FAR struct task_group_s *group,
pid_t pid) pid_t pid)
@@ -303,7 +303,7 @@ FAR struct child_status_s *group_findchild(FAR struct task_group_s *group,
return NULL; return NULL;
} }
/***************************************************************************** /****************************************************************************
* Name: group_exitchild * Name: group_exitchild
* *
* Description: * Description:
@@ -320,7 +320,7 @@ FAR struct child_status_s *group_findchild(FAR struct task_group_s *group,
* Called during SIGCHLD processing in a safe context. No special precautions * Called during SIGCHLD processing in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
FAR struct child_status_s *group_exitchild(FAR struct task_group_s *group) FAR struct child_status_s *group_exitchild(FAR struct task_group_s *group)
{ {
@@ -339,7 +339,7 @@ FAR struct child_status_s *group_exitchild(FAR struct task_group_s *group)
return NULL; return NULL;
} }
/***************************************************************************** /****************************************************************************
* Name: group_removechild * Name: group_removechild
* *
* Description: * Description:
@@ -359,7 +359,7 @@ FAR struct child_status_s *group_exitchild(FAR struct task_group_s *group)
* Called during SIGCHLD processing in a safe context. No special precautions * Called during SIGCHLD processing in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
FAR struct child_status_s *group_removechild(FAR struct task_group_s *group, FAR struct child_status_s *group_removechild(FAR struct task_group_s *group,
pid_t pid) pid_t pid)
@@ -403,7 +403,7 @@ FAR struct child_status_s *group_removechild(FAR struct task_group_s *group,
return curr; return curr;
} }
/***************************************************************************** /****************************************************************************
* Name: group_removechildren * Name: group_removechildren
* *
* Description: * Description:
@@ -419,7 +419,7 @@ FAR struct child_status_s *group_removechild(FAR struct task_group_s *group,
* Called during task exit processing in a safe context. No special * Called during task exit processing in a safe context. No special
* precautions are required here. * precautions are required here.
* *
*****************************************************************************/ ****************************************************************************/
void group_removechildren(FAR struct task_group_s *group) void group_removechildren(FAR struct task_group_s *group)
{ {
+22 -22
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_create.c * sched/group/group_create.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -51,29 +51,29 @@
#ifdef HAVE_TASK_GROUP #ifdef HAVE_TASK_GROUP
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/* Is this worth making a configuration option? */ /* Is this worth making a configuration option? */
#define GROUP_INITIAL_MEMBERS 4 #define GROUP_INITIAL_MEMBERS 4
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/* This is counter that is used to generate unique task group IDs */ /* This is counter that is used to generate unique task group IDs */
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV) #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
static gid_t g_gidcounter; static gid_t g_gidcounter;
#endif #endif
/***************************************************************************** /****************************************************************************
* Public Data * Public Data
*****************************************************************************/ ****************************************************************************/
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV) #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
/* This is the head of a list of all group members */ /* This is the head of a list of all group members */
@@ -81,11 +81,11 @@ static gid_t g_gidcounter;
FAR struct task_group_s *g_grouphead; FAR struct task_group_s *g_grouphead;
#endif #endif
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_assigngid * Name: group_assigngid
* *
* Description: * Description:
@@ -101,7 +101,7 @@ FAR struct task_group_s *g_grouphead;
* Called during task creation in a safe context. No special precautions * Called during task creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV) #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
static void group_assigngid(FAR struct task_group_s *group) static void group_assigngid(FAR struct task_group_s *group)
@@ -147,11 +147,11 @@ static void group_assigngid(FAR struct task_group_s *group)
} }
#endif /* HAVE_GROUP_MEMBERS */ #endif /* HAVE_GROUP_MEMBERS */
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_allocate * Name: group_allocate
* *
* Description: * Description:
@@ -174,7 +174,7 @@ static void group_assigngid(FAR struct task_group_s *group)
* Called during task creation in a safe context. No special precautions * Called during task creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype) int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
{ {
@@ -253,7 +253,7 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
return OK; return OK;
} }
/***************************************************************************** /****************************************************************************
* Name: group_initialize * Name: group_initialize
* *
* Description: * Description:
@@ -272,7 +272,7 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
* Called during task creation in a safe context. No special precautions * Called during task creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
int group_initialize(FAR struct task_tcb_s *tcb) int group_initialize(FAR struct task_tcb_s *tcb)
{ {
+20 -20
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_find.c * sched/group/group_find.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -51,31 +51,31 @@
#ifdef HAVE_TASK_GROUP #ifdef HAVE_TASK_GROUP
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Data * Public Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_findbygid * Name: group_findbygid
* *
* Description: * Description:
@@ -97,7 +97,7 @@
* precautions should be required here. However, extra care is taken when * precautions should be required here. However, extra care is taken when
* accessing the global g_grouphead list. * accessing the global g_grouphead list.
* *
*****************************************************************************/ ****************************************************************************/
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV) #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
FAR struct task_group_s *group_findbygid(gid_t gid) FAR struct task_group_s *group_findbygid(gid_t gid)
@@ -122,7 +122,7 @@ FAR struct task_group_s *group_findbygid(gid_t gid)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: group_findbypid * Name: group_findbypid
* *
* Description: * Description:
@@ -143,7 +143,7 @@ FAR struct task_group_s *group_findbygid(gid_t gid)
* precautions should be required here. However, extra care is taken when * precautions should be required here. However, extra care is taken when
* accessing the global g_grouphead list. * accessing the global g_grouphead list.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
FAR struct task_group_s *group_findbypid(pid_t pid) FAR struct task_group_s *group_findbypid(pid_t pid)
+20 -20
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_join.c * sched/group/group_join.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -52,26 +52,26 @@
#if defined(HAVE_TASK_GROUP) && !defined(CONFIG_DISABLE_PTHREAD) #if defined(HAVE_TASK_GROUP) && !defined(CONFIG_DISABLE_PTHREAD)
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/* Is this worth making a configuration option? */ /* Is this worth making a configuration option? */
#define GROUP_REALLOC_MEMBERS 4 #define GROUP_REALLOC_MEMBERS 4
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_addmember * Name: group_addmember
* *
* Description: * Description:
@@ -88,7 +88,7 @@
* Called during thread creation and during reparenting in a safe context. * Called during thread creation and during reparenting in a safe context.
* No special precautions are required here. * No special precautions are required here.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
static inline int group_addmember(FAR struct task_group_s *group, pid_t pid) static inline int group_addmember(FAR struct task_group_s *group, pid_t pid)
@@ -141,11 +141,11 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid)
} }
#endif /* HAVE_GROUP_MEMBERS */ #endif /* HAVE_GROUP_MEMBERS */
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_bind * Name: group_bind
* *
* Description: * Description:
@@ -168,7 +168,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid)
* - Called during thread creation in a safe context. No special precautions * - Called during thread creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
int group_bind(FAR struct pthread_tcb_s *tcb) int group_bind(FAR struct pthread_tcb_s *tcb)
{ {
@@ -182,7 +182,7 @@ int group_bind(FAR struct pthread_tcb_s *tcb)
return OK; return OK;
} }
/***************************************************************************** /****************************************************************************
* Name: group_join * Name: group_join
* *
* Description: * Description:
@@ -205,7 +205,7 @@ int group_bind(FAR struct pthread_tcb_s *tcb)
* - Called during thread creation in a safe context. No special precautions * - Called during thread creation in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
int group_join(FAR struct pthread_tcb_s *tcb) int group_join(FAR struct pthread_tcb_s *tcb)
{ {
+2 -2
View File
@@ -49,7 +49,7 @@
* Private Functions * Private Functions
****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_killchildren_handler * Name: group_killchildren_handler
* *
* Description: * Description:
@@ -62,7 +62,7 @@
* Return Value: * Return Value:
* 0 (OK) on success; a negated errno value on failure. * 0 (OK) on success; a negated errno value on failure.
* *
*****************************************************************************/ ****************************************************************************/
static int group_killchildren_handler(pid_t pid, FAR void *arg) static int group_killchildren_handler(pid_t pid, FAR void *arg)
{ {
+22 -22
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_leave.c * sched/group/group_leave.c
* *
* Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -56,23 +56,23 @@
#ifdef HAVE_TASK_GROUP #ifdef HAVE_TASK_GROUP
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_remove * Name: group_remove
* *
* Description: * Description:
@@ -88,7 +88,7 @@
* Called during task deletion in a safe context. No special precautions * Called during task deletion in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
#if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV) #if defined(HAVE_GROUP_MEMBERS) || defined(CONFIG_ARCH_ADDRENV)
static void group_remove(FAR struct task_group_s *group) static void group_remove(FAR struct task_group_s *group)
@@ -131,7 +131,7 @@ static void group_remove(FAR struct task_group_s *group)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Name: group_release * Name: group_release
* *
* Description: * Description:
@@ -147,7 +147,7 @@ static void group_remove(FAR struct task_group_s *group)
* Called during task deletion in a safe context. No special precautions * Called during task deletion in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
static inline void group_release(FAR struct task_group_s *group) static inline void group_release(FAR struct task_group_s *group)
{ {
@@ -276,7 +276,7 @@ static inline void group_release(FAR struct task_group_s *group)
sched_kfree(group); sched_kfree(group);
} }
/***************************************************************************** /****************************************************************************
* Name: group_removemember * Name: group_removemember
* *
* Description: * Description:
@@ -295,7 +295,7 @@ static inline void group_release(FAR struct task_group_s *group)
* Called during task deletion and also from the reparenting logic, both * Called during task deletion and also from the reparenting logic, both
* in a safe context. No special precautions are required here. * in a safe context. No special precautions are required here.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
static inline void group_removemember(FAR struct task_group_s *group, pid_t pid) static inline void group_removemember(FAR struct task_group_s *group, pid_t pid)
@@ -327,11 +327,11 @@ static inline void group_removemember(FAR struct task_group_s *group, pid_t pid)
} }
#endif /* HAVE_GROUP_MEMBERS */ #endif /* HAVE_GROUP_MEMBERS */
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_leave * Name: group_leave
* *
* Description: * Description:
@@ -350,7 +350,7 @@ static inline void group_removemember(FAR struct task_group_s *group, pid_t pid)
* Called during task deletion in a safe context. No special precautions * Called during task deletion in a safe context. No special precautions
* are required here. * are required here.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
void group_leave(FAR struct tcb_s *tcb) void group_leave(FAR struct tcb_s *tcb)
+18 -18
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/group/group_signal.c * sched/group/group_signal.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -51,13 +51,13 @@
#if defined(HAVE_TASK_GROUP) && !defined(CONFIG_DISABLE_SIGNALS) #if defined(HAVE_TASK_GROUP) && !defined(CONFIG_DISABLE_SIGNALS)
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
struct group_signal_s struct group_signal_s
@@ -70,15 +70,15 @@ struct group_signal_s
}; };
#endif #endif
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_signal_handler * Name: group_signal_handler
* *
* Description: * Description:
@@ -91,7 +91,7 @@ struct group_signal_s
* Return Value: * Return Value:
* 0 (OK) on success; a negated errno value on failure. * 0 (OK) on success; a negated errno value on failure.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
static int group_signal_handler(pid_t pid, FAR void *arg) static int group_signal_handler(pid_t pid, FAR void *arg)
@@ -191,11 +191,11 @@ static int group_signal_handler(pid_t pid, FAR void *arg)
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: group_signal * Name: group_signal
* *
* Description: * Description:
@@ -213,7 +213,7 @@ static int group_signal_handler(pid_t pid, FAR void *arg)
* this function may be called indirectly in the context of an interrupt * this function may be called indirectly in the context of an interrupt
* handler. * handler.
* *
*****************************************************************************/ ****************************************************************************/
int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo) int group_signal(FAR struct task_group_s *group, FAR siginfo_t *siginfo)
{ {
+1 -1
View File
@@ -66,7 +66,7 @@
/**************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/**************************************************************************** /****************************************************************************
* Name: pthread_getschedparam * Name: pthread_getschedparam
+10 -10
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/sched/sched_wait.c * sched/sched/sched_wait.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -49,15 +49,15 @@
#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT) #if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: wait * Name: wait
* *
* Description: * Description:
@@ -80,7 +80,7 @@
* Returned Value: * Returned Value:
* See waitpid(); * See waitpid();
* *
*****************************************************************************/ ****************************************************************************/
pid_t wait(FAR int *stat_loc) pid_t wait(FAR int *stat_loc)
{ {
+12 -12
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/sched/sched_waitid.c * sched/sched/sched_waitid.c
* *
* Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2013, 2015 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -50,18 +50,18 @@
#if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT) #if defined(CONFIG_SCHED_WAITPID) && defined(CONFIG_SCHED_HAVE_PARENT)
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: exited_child * Name: exited_child
* *
* Description: * Description:
* Handle the case where a child exited properlay was we (apparently) lost * Handle the case where a child exited properlay was we (apparently) lost
* the detch of child signal. * the detch of child signal.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef CONFIG_SCHED_CHILD_STATUS #ifdef CONFIG_SCHED_CHILD_STATUS
static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *child, static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *child,
@@ -85,11 +85,11 @@ static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *chil
} }
#endif #endif
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: waitid * Name: waitid
* *
* Description: * Description:
@@ -150,7 +150,7 @@ static void exited_child(FAR struct tcb_s *rtcb, FAR struct child_status_s *chil
* EINVAL - An invalid value was specified for options, or idtype and id * EINVAL - An invalid value was specified for options, or idtype and id
* specify an invalid set of processes. * specify an invalid set of processes.
* *
*****************************************************************************/ ****************************************************************************/
int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options) int waitid(idtype_t idtype, id_t id, FAR siginfo_t *info, int options)
{ {
+10 -10
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/sched/sched_waitpid.c * sched/sched/sched_waitpid.c
* *
* Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved. * Copyright (C) 2011-2013, 2015 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -51,15 +51,15 @@
#ifdef CONFIG_SCHED_WAITPID #ifdef CONFIG_SCHED_WAITPID
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: waitpid * Name: waitpid
* *
* Description: * Description:
@@ -176,7 +176,7 @@
* defined), then waitpid() is still available, but does not obey the * defined), then waitpid() is still available, but does not obey the
* restriction that the pid be a child of the caller. * restriction that the pid be a child of the caller.
* *
*****************************************************************************/ ****************************************************************************/
#ifndef CONFIG_SCHED_HAVE_PARENT #ifndef CONFIG_SCHED_HAVE_PARENT
pid_t waitpid(pid_t pid, int *stat_loc, int options) pid_t waitpid(pid_t pid, int *stat_loc, int options)
+18 -18
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/task/task_getgroup.c * sched/task/task_getgroup.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -47,31 +47,31 @@
#ifdef HAVE_TASK_GROUP #ifdef HAVE_TASK_GROUP
/***************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Types * Private Types
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Data * Private Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Data * Public Data
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: task_getgroup * Name: task_getgroup
* *
* Description: * Description:
@@ -90,7 +90,7 @@
* precautions should be required here. However, extra care is taken when * precautions should be required here. However, extra care is taken when
* accessing the global g_grouphead list. * accessing the global g_grouphead list.
* *
*****************************************************************************/ ****************************************************************************/
FAR struct task_group_s *task_getgroup(pid_t pid) FAR struct task_group_s *task_getgroup(pid_t pid)
{ {
+10 -10
View File
@@ -1,4 +1,4 @@
/***************************************************************************** /****************************************************************************
* sched/task/task_reparent.c * sched/task/task_reparent.c
* *
* Copyright (C) 2013 Gregory Nutt. All rights reserved. * Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -31,11 +31,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
* *
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Included Files * Included Files
*****************************************************************************/ ****************************************************************************/
#include <nuttx/config.h> #include <nuttx/config.h>
@@ -47,15 +47,15 @@
#ifdef CONFIG_SCHED_HAVE_PARENT #ifdef CONFIG_SCHED_HAVE_PARENT
/***************************************************************************** /****************************************************************************
* Private Functions * Private Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Public Functions * Public Functions
*****************************************************************************/ ****************************************************************************/
/***************************************************************************** /****************************************************************************
* Name: task_reparent * Name: task_reparent
* *
* Description: * Description:
@@ -69,7 +69,7 @@
* Return Value: * Return Value:
* 0 (OK) on success; A negated errno value on failure. * 0 (OK) on success; A negated errno value on failure.
* *
*****************************************************************************/ ****************************************************************************/
#ifdef HAVE_GROUP_MEMBERS #ifdef HAVE_GROUP_MEMBERS
int task_reparent(pid_t ppid, pid_t chpid) int task_reparent(pid_t ppid, pid_t chpid)