Fix typoes in drivers/rwbuffer.c from Chia Cheng Tsao

This commit is contained in:
Gregory Nutt 2013-07-09 07:59:28 -06:00
parent f9b9bf6e04
commit c6b141d190
3 changed files with 18 additions and 9 deletions

View File

@ -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).

View File

@ -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

View File

@ -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) */