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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [include/] [support.h] - Blame information for rev 327

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

Line No. Rev Author Line
1 2 marcus.erl
/* Support file for or32 tests.  This file should is included
2
   in each test. It calls main() function and add support for
3
   basic functions */
4
 
5
#ifndef SUPPORT_H
6
#define SUPPORT_H
7
 
8
#include <stdarg.h>
9
#include <stddef.h>
10
#include <limits.h>
11
 
12
#include "string.h"
13
 
14
/* Register access macros */
15
#define REG8(add) *((volatile unsigned char *)(add))
16
#define REG16(add) *((volatile unsigned short *)(add))
17
#define REG32(add) *((volatile unsigned long *)(add))
18
 
19
/* For writing into SPR. */
20
void mtspr(unsigned long spr, unsigned long value);
21
 
22
/* For reading SPR. */
23
unsigned long mfspr(unsigned long spr);
24
 
25
/* Function to be called at entry point - not defined here.  */
26
int main (int, char **);
27
 
28
/* Prints out a value */
29
void report(unsigned long value);
30
 
31
/* Calculates a 32-bit CRC */
32
unsigned long crc32 (unsigned long crc, const unsigned char *buf, unsigned long len);
33
 
34
/* return value by making a syscall */
35
extern void exit (int i) __attribute__ ((__noreturn__));
36
 
37
/* some stdlib functions */
38
 
39
/* defined in 'string.h'
40
extern void *memcpy (void *dest, const void *src, unsigned long n);
41
extern void *memmove (void *dest, const void *src, unsigned long n);
42
int memcmp (void *dstvoid, const void *srcvoid, unsigned long length);
43
extern void *memset (void * dstvoid, const char data, unsigned long length);
44
extern void *memchr(const void *s, int c, unsigned long n);
45
extern int strlen (const char *src);
46
extern int strcmp (const char *s1, const char *s2);
47
extern char *strcpy (char *dst0, char *src0);
48
*/
49
unsigned long strtoul (const char *str, char **endptr, int base);
50
 
51
/* defined in 'ctype.h'
52
#define isspace(c) ((c) == ' ' || (c) == '\t')
53
*/
54
 
55
extern volatile unsigned long timestamp;
56
extern void reset_timer (void);
57
extern unsigned long get_timer (unsigned long base);
58
extern void set_timer (unsigned long t);
59
extern void sleep(unsigned long sleep_time);
60
 
61
#endif

powered by: WebSVN 2.1.0

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