memory.h File Reference

#include <string.h>

Include dependency graph for memory.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define memcpy_ram2ram   memcpy
#define memcpy_code2ram(x, y, z)   code2data(y,x,z)
#define memcmp_ram2ram   memcmp
#define memcmp_code2ram   memcmp_code

Functions

void code2data (U8 _CONST_TYPE_ *src, U8 _MEM_TYPE_SLOW_ *dest, U8 nb_data)
int memcmp_code (U8 *ram, U8 _CONST_TYPE_ *rom, U16 n)


Detailed Description

General definition of library memory - Compiler: IAR EWAVR and GNU GCC for AVR
Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file memory.h.


Define Documentation

#define memcpy_ram2ram   memcpy

Definition at line 52 of file memory.h.

Referenced by file_read_buf().

#define memcpy_code2ram ( x,
y,
 )     code2data(y,x,z)

Definition at line 53 of file memory.h.

#define memcmp_ram2ram   memcmp

Definition at line 54 of file memory.h.

#define memcmp_code2ram   memcmp_code

Definition at line 55 of file memory.h.


Function Documentation

void code2data ( U8 _CONST_TYPE_ *  src,
U8 _MEM_TYPE_SLOW_ *  dest,
U8  nb_data 
)

Definition at line 55 of file memory.c.

References i.

00056 {
00057    U8 _CONST_TYPE_ *ptr_code=src;
00058    U8 *ptr_ram=dest;
00059    U8 i=nb_data;
00060    do
00061    {
00062       *ptr_ram=*ptr_code;
00063       ptr_ram++;
00064       ptr_code++;
00065       i--;
00066    } while(i);
00067 }

int memcmp_code ( U8 ram,
U8 _CONST_TYPE_ *  rom,
U16  n 
)

Definition at line 69 of file memory.c.

References i.

00070 {
00071    U16 i;
00072    
00073    for(i=0;i<n;i++)
00074    {
00075       if(ram[i]!=rom[i])
00076       {
00077          return -1;
00078       }
00079    }
00080    return 0;
00081 }


Generated on Fri May 15 15:41:42 2009 for ATMEL by  doxygen 1.5.3