memory.c File Reference

#include "config.h"
#include "memory.h"

Include dependency graph for memory.c:

Go to the source code of this file.

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

This file manages memory copy needed for previous C51 fat module.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file memory.c.


Function Documentation

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

Definition at line 58 of file memory.c.

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.

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