summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nuttx/ChangeLog13
-rw-r--r--nuttx/drivers/rwbuffer.c8
-rw-r--r--nuttx/include/nuttx/ascii.h6
3 files changed, 18 insertions, 9 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 8a94f7b76..c4bb84072 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -5116,6 +5116,13 @@
* libc/misc/lib_crc16.c and include/crc16.h: Add CRC16 support
(2013-7-7).
* arch/arm/src/stm32/stm32_otgfsdev.c: SourceForge bug #16: Fix
- endpoint allocation logic. The same endpoint can be allocated as
- an IN or an OUT endpoint. The implementation only support one
- allocation, either IN or OUT (From Chia Cheng Tsao, 2013-7-8).
+ to the endpoint allocation logic. Apparently the same endpoint can
+ be allocated as both an IN or an OUT endpoint. The existing
+ implementation only supported one allocation, either IN or OUT. This
+ resulted in failures to allocate enpoints when used with the CDC/ACM +
+ MSC composite driver (From Chia Cheng Tsao, 2013-7-8).
+ * arch/arm/src/stm32/stm32_sdio.c: SourceForge bug #17: Add
+ support for the data block end (DBCKEND) interrupt to terminate
+ 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).
diff --git a/nuttx/drivers/rwbuffer.c b/nuttx/drivers/rwbuffer.c
index 076ebc781..c085fd381 100644
--- a/nuttx/drivers/rwbuffer.c
+++ b/nuttx/drivers/rwbuffer.c
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/rwbuffer.c
*
- * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -274,7 +274,7 @@ static ssize_t rwb_writebuffer(FAR struct rwbuffer_s *rwb,
/* Add data to cache */
fvdbg("writebuffer: copying %d bytes from %p to %p\n",
- nblocks * wrb->blocksize, wrbuffer,
+ nblocks * rwb->blocksize, wrbuffer,
&rwb->wrbuffer[rwb->wrnblocks * rwb->blocksize]);
memcpy(&rwb->wrbuffer[rwb->wrnblocks * rwb->blocksize],
wrbuffer, nblocks * rwb->blocksize);
@@ -430,7 +430,7 @@ int rwb_initialize(FAR struct rwbuffer_s *rwb)
rwb->wrbuffer = kmalloc(allocsize);
if (!rwb->wrbuffer)
{
- fdbg("Write buffer kmalloc(%d) failed\n", allocsizee);
+ fdbg("Write buffer kmalloc(%d) failed\n", allocsize);
return -ENOMEM;
}
}
@@ -613,7 +613,7 @@ int rwb_write(FAR struct rwbuffer_s *rwb, off_t startblock,
{
rwb_resetrhbuffer(rwb);
}
- rwb_give(&rwb->rhsem);
+ rwb_semgive(&rwb->rhsem);
#endif
#ifdef CONFIG_FS_WRITEBUFFER
diff --git a/nuttx/include/nuttx/ascii.h b/nuttx/include/nuttx/ascii.h
index 090d7a49a..99c6fcf47 100644
--- a/nuttx/include/nuttx/ascii.h
+++ b/nuttx/include/nuttx/ascii.h
@@ -64,9 +64,11 @@
#define ASCII_SI 0x0f /* Shift In (^O) */
#define ASCII_DLE 0x10 /* Data link escape (^P) */
-#define ASCII_DC1 0x11 /* XON (^Q) */
+#define ASCII_DC1 0x11 /* Device control 1, XON (^Q) */
+#define ASCII_XON ASCII_DC1
#define ASCII_DC2 0x12 /* Device control 2, block-mode flow control (^R) */
-#define ASCII_DC3 0x13 /* XOFF (^S) */
+#define ASCII_DC3 0x13 /* Device control 3, XOFF (^S) */
+#define ASCII_XOFF ASCII_DC3
#define ASCII_DC4 0x14 /* Device control 4 (^T) */
#define ASCII_NAK 0x15 /* Negative acknowledge (^U) */
#define ASCII_SYN 0x16 /* Synchronous idle (^V) */