ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

ff_memory.c
Go to the documentation of this file.
00001 /*****************************************************************************
00002  *  FullFAT - High Performance, Thread-Safe Embedded FAT File-System         *
00003  *  Copyright (C) 2009  James Walmsley (james@worm.me.uk)                    *
00004  *                                                                           *
00005  *  This program is free software: you can redistribute it and/or modify     *
00006  *  it under the terms of the GNU General Public License as published by     *
00007  *  the Free Software Foundation, either version 3 of the License, or        *
00008  *  (at your option) any later version.                                      *
00009  *                                                                           *
00010  *  This program is distributed in the hope that it will be useful,          *
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
00013  *  GNU General Public License for more details.                             *
00014  *                                                                           *
00015  *  You should have received a copy of the GNU General Public License        *
00016  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.    *
00017  *                                                                           *
00018  *  IMPORTANT NOTICE:                                                        *
00019  *  =================                                                        *
00020  *  Alternative Licensing is available directly from the Copyright holder,   *
00021  *  (James Walmsley). For more information consult LICENSING.TXT to obtain   *
00022  *  a Commercial license.                                                    *
00023  *                                                                           *
00024  *  See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT.       *
00025  *                                                                           *
00026  *  Removing the above notice is illegal and will invalidate this license.   *
00027  *****************************************************************************
00028  *  See http://worm.me.uk/fullfat for more information.                      *
00029  *  Or  http://fullfat.googlecode.com/ for latest releases and the wiki.     *
00030  *****************************************************************************/
00031 
00048 #include "ff_memory.h"
00049 #include "ff_config.h"
00050 
00051 /*
00052  * HT inlined these functions
00053  *
00054  * Not much left for the C-module
00055  */
00056 
00057 
00058 #ifndef FF_INLINE_MEMORY_ACCESS
00059 FF_T_UINT8 FF_getChar(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset) {
00060     return (FF_T_UINT8) (pBuffer[aOffset]);
00061 }
00062 
00063 FF_T_UINT16 FF_getShort(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset) {
00064     FF_T_UN16 u16;
00065     pBuffer += aOffset;
00066     u16.bytes.u8_1 = pBuffer[1];
00067     u16.bytes.u8_0 = pBuffer[0];
00068     return u16.u16;
00069 }
00070 
00071 FF_T_UINT32 FF_getLong(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset) {
00072     FF_T_UN32 u32;
00073     pBuffer += aOffset;
00074     u32.bytes.u8_3 = pBuffer[3];
00075     u32.bytes.u8_2 = pBuffer[2];
00076     u32.bytes.u8_1 = pBuffer[1];
00077     u32.bytes.u8_0 = pBuffer[0];
00078     return u32.u32;
00079 }
00080 
00081 void FF_putChar(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset, FF_T_UINT8 Value) {
00082     pBuffer[aOffset] = Value;
00083 }
00084 
00085 void FF_putShort(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset, FF_T_UINT16 Value) {
00086     FF_T_UN16 u16;
00087     u16.u16 = Value;
00088     pBuffer += aOffset;
00089     pBuffer[0] = u16.bytes.u8_0;
00090     pBuffer[1] = u16.bytes.u8_1;
00091 }
00092 
00093 void FF_putLong(FF_T_UINT8 *pBuffer, FF_T_UINT32 aOffset, FF_T_UINT32 Value) {
00094     FF_T_UN32 u32;
00095     u32.u32 = Value;
00096     pBuffer += aOffset;
00097     pBuffer[0] = u32.bytes.u8_0;
00098     pBuffer[1] = u32.bytes.u8_1;
00099     pBuffer[2] = u32.bytes.u8_2;
00100     pBuffer[3] = u32.bytes.u8_3;
00101 }
00102 #endif

Generated on Sat May 26 2012 04:33:00 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.