aboutsummaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-09-11 13:53:44 +0000
committerpatacongo <patacongo@7fd9a85b-ad96-42d3-883c-3090e2eb8679>2012-09-11 13:53:44 +0000
commit648420e67a546b33400fd2fe5b6a50410276ae3d (patch)
treee6dcf892c529d804e104b98d59a249af6aed0d64 /nuttx/include
parentde7764b1d4d19619ea042dd297f6e76c6300db7b (diff)
downloadpx4-firmware-648420e67a546b33400fd2fe5b6a50410276ae3d.tar.gz
px4-firmware-648420e67a546b33400fd2fe5b6a50410276ae3d.tar.bz2
px4-firmware-648420e67a546b33400fd2fe5b6a50410276ae3d.zip
Add support for DMA memory allocator to FAT file system
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@5127 7fd9a85b-ad96-42d3-883c-3090e2eb8679
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/fs/fat.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/nuttx/include/nuttx/fs/fat.h b/nuttx/include/nuttx/fs/fat.h
index f69bd8571..3ae0fbee2 100644
--- a/nuttx/include/nuttx/fs/fat.h
+++ b/nuttx/include/nuttx/fs/fat.h
@@ -75,11 +75,39 @@ extern "C" {
#define EXTERN extern
#endif
-/* Non-standard functions to get and set FAT file/directory attributes */
+/****************************************************************************
+ * Name: fat_getattrib and fat_setattrib
+ *
+ * Description:
+ * Non-standard functions to get and set FAT file/directory attributes
+ *
+ ****************************************************************************/
EXTERN int fat_getattrib(const char *path, fat_attrib_t *attrib);
EXTERN int fat_setattrib(const char *path, fat_attrib_t setbits, fat_attrib_t clearbits);
+/****************************************************************************
+ * Name: fat_dma_alloc and fat_dma_free
+ *
+ * Description:
+ * The FAT file system allocates two I/O buffers for data transfer, each
+ * are the size of one device sector. One of the buffers is allocated
+ * once for each FAT volume that is mounted; the other buffers are
+ * allocated each time a FAT file is opened.
+ *
+ * Some hardware, however, may require special DMA-capable memory in
+ * order to perform the the transfers. If CONFIG_FAT_DMAMEMORY is defined
+ * then the architecture-specific hardware must provide the funtions
+ * fat_dma_alloc() and fat_dma_free() as prototyped below: fat_dmalloc()
+ * will allocate DMA-capable memory of the specified size; fat_dmafree()
+ * is the corresponding function that will be called to free the DMA-
+ * capable memory.
+ *
+ ****************************************************************************/
+
+EXTERN FAR void *fat_dma_alloc(size_t size);
+EXTERN void fat_dma_free(FAR void *memory);
+
#undef EXTERN
#ifdef __cplusplus
}