diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-07-12 07:09:24 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-07-12 07:09:24 -0600 |
commit | 9d75f8cc88cb5c89348a69a73b22c0fc73c5b742 (patch) | |
tree | b7ca84e376729f79c88d72d4e2011aefaaf7efa2 | |
parent | 695b0474bebb5b63c3c2d62a07d740866caac7c0 (diff) | |
download | nuttx-9d75f8cc88cb5c89348a69a73b22c0fc73c5b742.tar.gz nuttx-9d75f8cc88cb5c89348a69a73b22c0fc73c5b742.tar.bz2 nuttx-9d75f8cc88cb5c89348a69a73b22c0fc73c5b742.zip |
Fix typo/compilation error with USB device DMA memory allocation is enabled
-rw-r--r-- | nuttx/ChangeLog | 3 | ||||
-rw-r--r-- | nuttx/include/nuttx/usb/usbdev.h | 14 | ||||
-rw-r--r-- | nuttx/include/signal.h | 31 | ||||
-rw-r--r-- | nuttx/libc/misc/lib_crc16.c | 2 |
4 files changed, 26 insertions, 24 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c4bb84072..686b517cd 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -5126,3 +5126,6 @@ transfers (From Chia Cheng Tsao, 2013-7-8) * drivers/rwbuffer.c: SourceForge bug #17: Correct typos that can cause failures in some configurations (From Chia Cheng Tsao, 2013-7-8). + * include/nuttx/usb/usbdev.h: Fix some typos that cause compiler errors + when CONFIG_USBDEV_DMA and CONFIG_USBDEV_DMAMEMORY are selected (From + Chia Cheng Tsao, 2013-7-12). diff --git a/nuttx/include/nuttx/usb/usbdev.h b/nuttx/include/nuttx/usb/usbdev.h index 7d47055d7..6cf3d46f9 100644 --- a/nuttx/include/nuttx/usb/usbdev.h +++ b/nuttx/include/nuttx/usb/usbdev.h @@ -1,7 +1,7 @@ /************************************************************************************ * include/nuttx/usb/usbdev.h * - * Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2010, 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * NOTE: This interface was inspired by the Linux gadget interface by @@ -86,8 +86,8 @@ /* Allocate/free an I/O buffer. Should not be called from interrupt processing! */ #ifdef CONFIG_USBDEV_DMA -# define EP_ALLOCBUFFER(ep,nb) (ep)->ops->alloc(ep,nb) -# define EP_FREEBUFFER(ep,buff) (ep)->ops->free(ep,buf) +# define EP_ALLOCBUFFER(ep,nb) (ep)->ops->allocbuffer(ep,nb) +# define EP_FREEBUFFER(ep,buf) (ep)->ops->freebuffer(ep,buf) #else # define EP_ALLOCBUFFER(ep,nb) malloc(nb) # define EP_FREEBUFFER(ep,buf) free(buf) @@ -340,7 +340,7 @@ extern "C" * ************************************************************************************/ -EXTERN int usbdev_register(FAR struct usbdevclass_driver_s *driver); +int usbdev_register(FAR struct usbdevclass_driver_s *driver); /************************************************************************************ * Name: usbdev_unregister @@ -352,7 +352,7 @@ EXTERN int usbdev_register(FAR struct usbdevclass_driver_s *driver); * ************************************************************************************/ -EXTERN int usbdev_unregister(FAR struct usbdevclass_driver_s *driver); +int usbdev_unregister(FAR struct usbdevclass_driver_s *driver); /**************************************************************************** * Name: usbdev_dma_alloc and usbdev_dma_free @@ -381,8 +381,8 @@ EXTERN int usbdev_unregister(FAR struct usbdevclass_driver_s *driver); ****************************************************************************/ #if defined(CONFIG_USBDEV_DMA) && defined(CONFIG_USBDEV_DMAMEMORY) -EXTERN FAR void *usbdev_dma_alloc(size_t size); -EXTERN void usbdev_dma_free(FAR void *memory); +FAR void *usbdev_dma_alloc(size_t size); +void usbdev_dma_free(FAR void *memory); #endif #undef EXTERN diff --git a/nuttx/include/signal.h b/nuttx/include/signal.h index a31e62ff2..271328da7 100644 --- a/nuttx/include/signal.h +++ b/nuttx/include/signal.h @@ -246,23 +246,24 @@ extern "C" { #define EXTERN extern #endif -EXTERN int kill(pid_t, int); -EXTERN int sigemptyset(FAR sigset_t *set); -EXTERN int sigfillset(FAR sigset_t *set); -EXTERN int sigaddset(FAR sigset_t *set, int signo); -EXTERN int sigdelset(FAR sigset_t *set, int signo); -EXTERN int sigismember(FAR const sigset_t *set, int signo); -EXTERN int sigaction(int sig, FAR const struct sigaction *act, FAR struct sigaction *oact); -EXTERN int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset); -EXTERN int sigpending(FAR sigset_t *set); -EXTERN int sigsuspend(FAR const sigset_t *sigmask); -EXTERN int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *value); -EXTERN int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *value, - FAR const struct timespec *timeout); +int kill(pid_t, int); +int sigemptyset(FAR sigset_t *set); +int sigfillset(FAR sigset_t *set); +int sigaddset(FAR sigset_t *set, int signo); +int sigdelset(FAR sigset_t *set, int signo); +int sigismember(FAR const sigset_t *set, int signo); +int sigaction(int sig, FAR const struct sigaction *act, + FAR struct sigaction *oact); +int sigprocmask(int how, FAR const sigset_t *set, FAR sigset_t *oset); +int sigpending(FAR sigset_t *set); +int sigsuspend(FAR const sigset_t *sigmask); +int sigwaitinfo(FAR const sigset_t *set, FAR struct siginfo *value); +int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *value, + FAR const struct timespec *timeout); #ifdef CONFIG_CAN_PASS_STRUCTS -EXTERN int sigqueue(int pid, int signo, union sigval value); +int sigqueue(int pid, int signo, union sigval value); #else -EXTERN int sigqueue(int pid, int signo, FAR void *sival_ptr); +int sigqueue(int pid, int signo, FAR void *sival_ptr); #endif #undef EXTERN diff --git a/nuttx/libc/misc/lib_crc16.c b/nuttx/libc/misc/lib_crc16.c index 065c586ee..76e8dac8a 100644 --- a/nuttx/libc/misc/lib_crc16.c +++ b/nuttx/libc/misc/lib_crc16.c @@ -99,8 +99,6 @@ static uint16_t crc16_tab[256] = 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 }; -#define updcrc(cp, crc) ( crc16_tab[((crc >> 8) & 255)] ^ (crc << 8) ^ cp) - /************************************************************************************************ * Public Functions ************************************************************************************************/ |