summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-19 18:51:02 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-04-19 18:51:02 +0000
commit0a237f936cc0145ea529c8ecca596061a044450d (patch)
tree4ee007a262bfaaeee2f9f4f2f51aeee3da83db47
parent4ee8e4abfb4fb9e46ea6ce2e3685312a684c67d5 (diff)
downloadpx4-nuttx-0a237f936cc0145ea529c8ecca596061a044450d.tar.gz
px4-nuttx-0a237f936cc0145ea529c8ecca596061a044450d.tar.bz2
px4-nuttx-0a237f936cc0145ea529c8ecca596061a044450d.zip
Rename i2c directories to sensors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3525 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r--nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c4
-rw-r--r--nuttx/arch/arm/src/stm32/stm32_i2c.c2
-rwxr-xr-xnuttx/arch/arm/src/stm32/stm32_i2c.h2
-rw-r--r--nuttx/arch/z80/src/ez80/ez80_i2c.c2
-rwxr-xr-xnuttx/arch/z80/src/z8/z8_i2c.c2
-rw-r--r--nuttx/configs/vsn/src/sif.c4
-rw-r--r--nuttx/drivers/Makefile68
-rw-r--r--nuttx/drivers/sensors/Make.defs (renamed from nuttx/drivers/i2c/Make.defs)10
-rw-r--r--nuttx/drivers/sensors/st_lis331dl.c (renamed from nuttx/drivers/i2c/st_lis331dl.c)4
-rw-r--r--nuttx/graphics/nxfonts/nxfonts_convert.c5
-rw-r--r--nuttx/include/nuttx/i2c.h (renamed from nuttx/include/nuttx/i2c/i2c.h)8
-rw-r--r--nuttx/include/nuttx/nxfonts.h4
-rw-r--r--nuttx/include/nuttx/sensors/st_lis331dl.h (renamed from nuttx/include/nuttx/i2c/st_lis331dl.h)11
13 files changed, 63 insertions, 63 deletions
diff --git a/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c b/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c
index dc2e454b9..3477b9e53 100644
--- a/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c
+++ b/nuttx/arch/arm/src/lpc313x/lpc313x_i2c.c
@@ -3,7 +3,7 @@
*
* Author: David Hewson
*
- * Copyright (C) 2010 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2010-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,7 @@
#include <debug.h>
#include <nuttx/arch.h>
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include <arch/irq.h>
#include <arch/board/board.h>
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.c b/nuttx/arch/arm/src/stm32/stm32_i2c.c
index f19a1909c..84f099ba1 100644
--- a/nuttx/arch/arm/src/stm32/stm32_i2c.c
+++ b/nuttx/arch/arm/src/stm32/stm32_i2c.c
@@ -65,7 +65,7 @@
#include <nuttx/config.h>
#include <nuttx/arch.h>
#include <nuttx/irq.h>
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include <nuttx/kmalloc.h>
#include <arch/board/board.h>
diff --git a/nuttx/arch/arm/src/stm32/stm32_i2c.h b/nuttx/arch/arm/src/stm32/stm32_i2c.h
index 9bb17521a..23a06bc05 100755
--- a/nuttx/arch/arm/src/stm32/stm32_i2c.h
+++ b/nuttx/arch/arm/src/stm32/stm32_i2c.h
@@ -41,7 +41,7 @@
************************************************************************************/
#include <nuttx/config.h>
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include "chip.h"
#include "chip/stm32_i2c.h"
diff --git a/nuttx/arch/z80/src/ez80/ez80_i2c.c b/nuttx/arch/z80/src/ez80/ez80_i2c.c
index 74dc89919..609ab22bd 100644
--- a/nuttx/arch/z80/src/ez80/ez80_i2c.c
+++ b/nuttx/arch/z80/src/ez80/ez80_i2c.c
@@ -47,7 +47,7 @@
#include <assert.h>
#include <debug.h>
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include <arch/io.h>
#include <arch/board/board.h>
diff --git a/nuttx/arch/z80/src/z8/z8_i2c.c b/nuttx/arch/z80/src/z8/z8_i2c.c
index 11825ac59..be4a94eb0 100755
--- a/nuttx/arch/z80/src/z8/z8_i2c.c
+++ b/nuttx/arch/z80/src/z8/z8_i2c.c
@@ -47,7 +47,7 @@
#include <assert.h>
#include <debug.h>
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include <arch/board/board.h>
#include <eZ8.h> /* eZ8 Register definitions */
diff --git a/nuttx/configs/vsn/src/sif.c b/nuttx/configs/vsn/src/sif.c
index 7a510da24..2d5351e87 100644
--- a/nuttx/configs/vsn/src/sif.c
+++ b/nuttx/configs/vsn/src/sif.c
@@ -75,8 +75,8 @@
#include <nuttx/time.h>
#include <nuttx/rtc.h>
-#include <nuttx/i2c/i2c.h>
-#include <nuttx/i2c/st_lis331dl.h>
+#include <nuttx/i2c.h>
+#include <nuttx/sensors/st_lis331dl.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/nuttx/drivers/Makefile b/nuttx/drivers/Makefile
index 68f342754..45dbe761a 100644
--- a/nuttx/drivers/Makefile
+++ b/nuttx/drivers/Makefile
@@ -36,74 +36,72 @@
-include $(TOPDIR)/Make.defs
ifeq ($(WINTOOL),y)
-INCDIROPT = -w
+INCDIROPT = -w
endif
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
include serial/Make.defs
-ROOTDEPPATH = --dep-path .
-SERIALDEPPATH = --dep-path serial
+ROOTDEPPATH = --dep-path .
+SERIALDEPPATH = --dep-path serial
endif
ifeq ($(CONFIG_NET),y)
include net/Make.defs
-ROOTDEPPATH = --dep-path .
-NETDEPPATH = --dep-path net
+ROOTDEPPATH = --dep-path .
+NETDEPPATH = --dep-path net
endif
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
include pipes/Make.defs
-ROOTDEPPATH = --dep-path .
-PIPEDEPPATH = --dep-path pipes
+ROOTDEPPATH = --dep-path .
+PIPEDEPPATH = --dep-path pipes
endif
ifeq ($(CONFIG_USBDEV),y)
include usbdev/Make.defs
-ROOTDEPPATH = --dep-path .
-USBDEVDEPPATH = --dep-path usbdev
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev}
+ROOTDEPPATH = --dep-path .
+USBDEVDEPPATH = --dep-path usbdev
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbdev}
endif
ifeq ($(CONFIG_USBHOST),y)
include usbhost/Make.defs
-ROOTDEPPATH = --dep-path .
-USBHOSTDEPPATH = --dep-path usbhost
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost}
+ROOTDEPPATH = --dep-path .
+USBHOSTDEPPATH = --dep-path usbhost
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/usbhost}
endif
include mmcsd/Make.defs
-ROOTDEPPATH = --dep-path .
-MMCSDDEPPATH = --dep-path mmcsd
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd}
+ROOTDEPPATH = --dep-path .
+MMCSDDEPPATH = --dep-path mmcsd
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd}
include lcd/Make.defs
-ROOTDEPPATH = --dep-path .
-LCDDEPPATH = --dep-path lcd
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd}
+ROOTDEPPATH = --dep-path .
+LCDDEPPATH = --dep-path lcd
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/lcd}
ifneq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
include bch/Make.defs
-ROOTDEPPATH = --dep-path .
-BCHDEPPATH = --dep-path bch
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch}
+ROOTDEPPATH = --dep-path .
+BCHDEPPATH = --dep-path bch
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/bch}
endif
endif
include mtd/Make.defs
-ROOTDEPPATH = --dep-path .
-MTDDEPPATH = --dep-path mtd
-
-ifeq ($(CONFIG_I2C),y)
-include i2c/Make.defs
-ROOTDEPPATH = --dep-path .
-I2CDEPPATH = --dep-path i2c
-CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/i2c}
-endif
+ROOTDEPPATH = --dep-path .
+MTDDEPPATH = --dep-path mtd
+
+include sensors/Make.defs
+ROOTDEPPATH = --dep-path .
+SENSORDEPPATH = --dep-path sensors
+CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/sensors}
ASRCS = $(SERIAL_ASRCS) $(NET_ASRCS) $(PIPE_ASRCS) $(USBDEV_ASRCS) \
$(USBHOST_ASRCS) $(MMCSD_ASRCS) $(LCD_ASRCS) $(BCH_ASRCS) \
- $(MTD_ASRCS)
+ $(MTD_ASRCS) $(SENSOR_ASRCS)
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS =
@@ -115,7 +113,7 @@ endif
endif
CSRCS += $(SERIAL_CSRCS) $(NET_CSRCS) $(PIPE_CSRCS) $(USBDEV_CSRCS) \
$(USBHOST_CSRCS) $(MMCSD_CSRCS) $(LCD_CSRCS) $(BCH_CSRCS) \
- $(MTD_CSRCS) $(I2C_CSRCS)
+ $(MTD_CSRCS) $(SENSOR_CSRCS)
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
@@ -123,7 +121,7 @@ OBJS = $(AOBJS) $(COBJS)
BIN = libdrivers$(LIBEXT)
-VPATH = serial:net:pipes:usbdev:usbhost:mmcsd:lcd:bch:mtd:i2c
+VPATH = serial:net:pipes:usbdev:usbhost:mmcsd:lcd:bch:mtd:sensors
all: $(BIN)
@@ -141,7 +139,7 @@ $(BIN): $(OBJS)
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) $(SERIALDEPPATH) $(NETDEPPATH) $(PIPEDEPPATH) \
$(USBDEVDEPPATH) $(USBHOSTDEPPATH) $(MMCSDDEPPATH) $(LCDDEPPATH) \
- $(BCHDEPPATH) $(MTDDEPPATH) $(I2CDEPPATH)\
+ $(BCHDEPPATH) $(MTDDEPPATH) $(SENSORDEPPATH) \
$(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
@touch $@
diff --git a/nuttx/drivers/i2c/Make.defs b/nuttx/drivers/sensors/Make.defs
index 2358d533b..61badadc2 100644
--- a/nuttx/drivers/i2c/Make.defs
+++ b/nuttx/drivers/sensors/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# drivers/i2c/Make.defs
+# drivers/sensors/Make.defs
#
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -33,10 +33,12 @@
#
############################################################################
-I2C_ASRCS =
-I2C_CSRCS =
+SENSOR_ASRCS =
+SENSOR_CSRCS =
+
+# These drivers depend on I2C support
ifeq ($(CONFIG_I2C),y)
-I2C_CSRCS += st_lis331dl.c
+SENSOR_CSRCS += st_lis331dl.c
endif
diff --git a/nuttx/drivers/i2c/st_lis331dl.c b/nuttx/drivers/sensors/st_lis331dl.c
index 7d5cdc4a2..19f7dd755 100644
--- a/nuttx/drivers/i2c/st_lis331dl.c
+++ b/nuttx/drivers/sensors/st_lis331dl.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * drivers/i2c/st_lis331dl.c
+ * drivers/sensors/st_lis331dl.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
*
@@ -47,7 +47,7 @@
#include <stdio.h>
#include <nuttx/kmalloc.h>
-#include <nuttx/i2c/st_lis331dl.h>
+#include <nuttx/sensors/st_lis331dl.h>
/************************************************************************************
* Private Data Types
diff --git a/nuttx/graphics/nxfonts/nxfonts_convert.c b/nuttx/graphics/nxfonts/nxfonts_convert.c
index c5afb759e..429518cf0 100644
--- a/nuttx/graphics/nxfonts/nxfonts_convert.c
+++ b/nuttx/graphics/nxfonts/nxfonts_convert.c
@@ -65,10 +65,7 @@
# define NXF_PIXELMASK 0x01
# define NXF_SCALEX(x) ((x) >> 3)
# define NXF_PIXEL_T uint8_t
-# define NXF_MULTIPIXEL(p) ((uint8_t)(p) << 7 | (uint8_t)(p) << 6 | \
- (uint8_t)(p) << 5 | (uint8_t)(p) << 4 | \
- (uint8_t)(p) << 3 | (uint8_t)(p) << 2 | \
- (uint8_t)(p) << 1 | (p))
+# define NXF_MULTIPIXEL(p) ((p) ? 0xff : 0x00)
#elif NXFONTS_BITSPERPIXEL == 2
diff --git a/nuttx/include/nuttx/i2c/i2c.h b/nuttx/include/nuttx/i2c.h
index 571c3c401..748b7cc60 100644
--- a/nuttx/include/nuttx/i2c/i2c.h
+++ b/nuttx/include/nuttx/i2c.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * include/nuttx/i2c/i2c.h
+ * include/nuttx/i2c.h
*
* Copyright(C) 2009-2011 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@@ -33,8 +33,8 @@
*
****************************************************************************/
-#ifndef __INCLUDE_NUTTX_I2C_I2C_H
-#define __INCLUDE_NUTTX_I2C_I2C_H
+#ifndef __INCLUDE_NUTTX_I2C_H
+#define __INCLUDE_NUTTX_I2C_H
/****************************************************************************
* Included Files
@@ -330,4 +330,4 @@ EXTERN int up_i2cuninitialize(FAR struct i2c_dev_s * dev);
#if defined(__cplusplus)
}
#endif
-#endif /* __INCLUDE_NUTTX_I2C_I2C_H */
+#endif /* __INCLUDE_NUTTX_I2C_H */
diff --git a/nuttx/include/nuttx/nxfonts.h b/nuttx/include/nuttx/nxfonts.h
index 9a8603964..e9c17362a 100644
--- a/nuttx/include/nuttx/nxfonts.h
+++ b/nuttx/include/nuttx/nxfonts.h
@@ -161,6 +161,10 @@ EXTERN FAR const struct nx_fontbitmap_s *nxf_getbitmap(uint16_t ch);
*
****************************************************************************/
+EXTERN int nxf_convert_1bpp(FAR uint8_t *dest, uint16_t height,
+ uint16_t width, uint16_t stride,
+ FAR const struct nx_fontbitmap_s *bm,
+ nxgl_mxpixel_t color);
EXTERN int nxf_convert_2bpp(FAR uint8_t *dest, uint16_t height,
uint16_t width, uint16_t stride,
FAR const struct nx_fontbitmap_s *bm,
diff --git a/nuttx/include/nuttx/i2c/st_lis331dl.h b/nuttx/include/nuttx/sensors/st_lis331dl.h
index 31092ae79..679ba81ec 100644
--- a/nuttx/include/nuttx/i2c/st_lis331dl.h
+++ b/nuttx/include/nuttx/sensors/st_lis331dl.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * include/nuttx/i2c/st_lis331dl.h
+ * include/nuttx/sensors/st_lis331dl.h
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
*
@@ -39,13 +39,12 @@
* \brief ST LIS331DL I2C Device Driver
**/
-#ifndef __INCLUDE_NUTTX_I2C_ST_LIS331DL_H
-#define __INCLUDE_NUTTX_I2C_ST_LIS331DL_H
+#ifndef __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H
+#define __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H
-#include <nuttx/i2c/i2c.h>
+#include <nuttx/i2c.h>
#include <stdbool.h>
-
/************************************************************************************
* Pre-Processor Declarations
************************************************************************************/
@@ -176,5 +175,5 @@ EXTERN const struct st_lis331dl_vector_s * st_lis331dl_getreadings(struct st_lis
#endif
#endif /* __ASSEMBLY__ */
-#endif /* __INCLUDE_NUTTX_I2C_ST_LIS331DL_H */
+#endif /* __INCLUDE_NUTTX_SENSORS_ST_LIS331DL_H */