OpenCores
URL https://opencores.org/ocsvn/ion/ion/trunk

Subversion Repositories ion

[/] [ion/] [trunk/] [src/] [adventure/] [adv_baremetal.h] - Blame information for rev 190

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 90 ja_rd
 
2
#ifndef ADV_BAREMETAL_H_INCLUDED
3
#define ADV_BAREMETAL_H_INCLUDED
4
 
5
#include <stdint.h>
6
 
7
/* fake array-based file */
8
typedef struct s_file {
9
    uint32_t line_ptr;
10
    uint32_t open;
11
} MFILE;
12
 
13
 
14
/* fake malloc */
15
void *alloc_mem(uint32_t num, uint32_t size);
16
/* fake exit */
17
void exit(uint32_t n);
18
/* fake file open for adventure.txt */
19
MFILE * mopen(const char * filename, const char * mode);
20
/* fake gets, adapted for use with string array */
21
void mgets (char *str, int size, MFILE *stream);
22
/* Initialize all the fake file data structures */
23
void startup(void);
24
/* Ask user if (s)he wants to use the auto-walk */
25
void prompt_use_walkthrough(void);
26
/* Replacement for fDATETIME with no random element (or time) */
27
void fDATIME(long *X, long *Y);
28
/* get user command from stdio or from walkthrough file */
29
char *get_command(char *str);
30
 
31
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.