##// END OF EJS Templates
Added STM32F4 target, improved rules files, added additional Include folder var...
Added STM32F4 target, improved rules files, added additional Include folder var for project files.

File last commit:

r12:cc0fb1c881c0 default
r14:c6ae61909bfd default
Show More
ucdirent.h
110 lines | 2.4 KiB | text/x-c | CLexer
/*------------------------------------------------------------------------------
-- This file is a part of the libuc, microcontroler library
-- Copyright (C) 2012, Alexis Jeandet
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program; if not, write to the Free Software
-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-------------------------------------------------------------------------------
-- Author : Alexis Jeandet
-- Mail : alexis.jeandet@gmail.com
-------------------------------------------------------------------------------*/
#ifndef UCDIRENT_H
#define UCDIRENT_H
#include <uhandle.h>
#include <blkdevice.h>
//#include <fs.h>
#define ATTR_READ_ONLY 0x01
#define ATTR_HIDDEN 0x02
#define ATTR_SYSTEM 0x04
#define ATTR_VOLUME_ID 0x08
#define ATTR_DIRECTORY 0x10
#define ATTR_ARCHIVE 0x20
#define ATTR_LONGNAME 0x0F
#define DIRENT_EndOfDir 1
#define DIRENT_BabArg 2
#define DIRENT_ReadErr 3
#define DIRENT_LastSect 4
#define DIRENT_BadSect 5
#define DIRENT_noErr 0
typedef struct dirent_str ucdirent;
typedef int (*getrootfirstent_t)(ucdirent* entry);
typedef int (*nextdirent_t)(ucdirent* entry);
struct dirent_str
{
unsigned char DIR_Name[16];
unsigned char DIR_Attr;
unsigned char DIR_CrtTimeTenth;
unsigned short DIR_CrtTime;
unsigned short DIR_CrtDate;
unsigned short DIR_LstAccDate;
unsigned short DIR_FstClusHI;
unsigned short DIR_WrtTime;
unsigned short DIR_WrtDate;
unsigned short DIR_FstClustLO;
unsigned int DIR_FileSize;
unsigned int CurrentSec;
unsigned char Currententry;
UHANDLE fs;
getrootfirstent_t getrootfirstent;
nextdirent_t nextdirent;
};
#define direntgetroot(dirent) (dirent).getrootfirstent(&dirent)
#define direntgetnext(dirent) (dirent).nextdirent(&dirent)
#endif