- refactored libsys into common
git-svn-id: http://moon:8086/svn/mips@198 a8ebac50-d88d-4704-bea3-6648445a41b3
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#ifndef LIBSYS_H
|
||||
#define LIBSYS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <board.h>
|
||||
|
||||
// ---------------------------------------------------------
|
||||
// Types
|
||||
// ---------------------------------------------------------
|
||||
|
||||
#define NO_ERROR LSYS_SUCCESS
|
||||
#define ERROR LSYS_ERR_BASE
|
||||
#define LSYS_SUCCESS 0
|
||||
#define LSYS_ERR_BASE 0x80000000
|
||||
|
||||
#define IS_ERROR(e) ((e & LSYS_ERR_BASE) == LSYS_ERR_BASE)
|
||||
|
||||
void enter_critical();
|
||||
void exit_critical();
|
||||
|
||||
int write(int file, char *ptr, int len);
|
||||
int sputs(char const *pStr);
|
||||
void print_byte(char byte);
|
||||
void print_word(int word);
|
||||
void _exit (int exitcode);
|
||||
void sleep(unsigned ms);
|
||||
void usleep(unsigned us);
|
||||
|
||||
void PrintBuffer8(uint8_t *pBuf, int nbpr, int len);
|
||||
void memdump(uint8_t *pBuf, int print_offset_only, int num_bytes_per_row, int len);
|
||||
|
||||
#endif // LIBSYS_H
|
||||
|
||||
Reference in New Issue
Block a user