Fix typo/compilation error with USB device DMA memory allocation is enabled
This commit is contained in:
parent
c6b141d190
commit
352c313fa7
@ -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).
|
||||
|
@ -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
|
||||
|
@ -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,
|
||||
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
|
||||
|
@ -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
|
||||
************************************************************************************************/
|
||||
|
Loading…
Reference in New Issue
Block a user