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 55 of file memory.h.

Referenced by file_read_buf().

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

Definition at line 56 of file memory.h.

#define memcmp_ram2ram   memcmp

Definition at line 57 of file memory.h.

#define memcmp_code2ram   memcmp_code

Definition at line 58 of file memory.h.


Function Documentation

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

Definition at line 58 of file memory.c.

References i.

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

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

Definition at line 72 of file memory.c.

References i.

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


Generated on Wed Sep 23 09:17:09 2009 for ATMEL by  doxygen 1.5.3