]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blob - src/interp/coff/osal.h
nand flash addition
[keystone-rtos/ibl.git] / src / interp / coff / osal.h
1 #ifndef OSAL_H_
2 #define OSAL_H_
5 /********************************************************************
6  * IBL Adaptions
7  *
8  *  The ibl will use the file based definition, but define it to be 
9  *  directed into the BOOT_MODULE_FXN_TABLE calls.
10  *
11  ********************************************************************/
12 #include "iblloc.h"
14 #define FILE_BASED  1
15 #define FILE        BOOT_MODULE_FXN_TABLE       /* use the already existing global */
18 /* Redirect seek and reads */
19 #define fseek(x,y,z)        (*x->seek)((Int32)(y),(Int32)(z))
20 #define fread(w,x,y,z)      (((*z->read)((Uint8 *)(w),(Uint32)((x)*(y)))) == 0 ? (y) : 0)
22 /* Use stdlib functions where possible */
23 #define mem_copy(dest,src,nbytes)           memcpy((void *)(dest),(void *)(src),nbytes)
24 #define mem_write(buf, nbytes, addr, page)  memcpy((void *)(addr),(void *)(buf),nbytes)
25 #define str_comp                            strcmp
26 #define strn_copy                           strncpy
29 /***********************
30  * Function Prototypes
31  **********************/
32 char* strn_copy(char* dst, const char* src, unsigned int n);
33 int str_comp(const char *s1, const char *s2);
35 #endif /*OSAL_H_*/