- bootloader added board file - refactored header files - constify constants git-svn-id: http://moon:8086/svn/mips@99 a8ebac50-d88d-4704-bea3-6648445a41b3
39 lines
1.1 KiB
C
39 lines
1.1 KiB
C
#ifndef LIBSYS_H
|
|
#define LIBSYS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
// ---------------------------------------------------------
|
|
// Types
|
|
// ---------------------------------------------------------
|
|
#define LSYS_ERR_BASE 0x80000000
|
|
#define IS_ERROR(e) ((e & LSYS_ERR_BASE) == LSYS_ERR_BASE)
|
|
|
|
// MIPS specific
|
|
uint32_t CP0_SR_read(void);
|
|
void CP0_SR_write(uint32_t val);
|
|
uint32_t CP0_CR_read(void);
|
|
void CP0_CR_write(uint32_t val);
|
|
uint32_t CP0_PRID_read(void);
|
|
uint32_t CP0_TR_read(void);
|
|
void CP0_TR_write(uint32_t val);
|
|
void CP0_TR_write_ptr(uint32_t* pPtr);
|
|
void CP0_TR_read_ptr(uint32_t* pPtr);
|
|
void ICACHE_invalidate_all(void);
|
|
void ICACHE_invalidate_at(uint32_t* pPtr);
|
|
void DCACHE_invalidate_all(void);
|
|
void DCACHE_invalidate_at(uint32_t* pPtr);
|
|
|
|
// General
|
|
char readchar(void);
|
|
void writechar(char c);
|
|
int write(int file, char *ptr, int len);
|
|
int sputs(char const *pStr);
|
|
void print_byte(char byte);
|
|
void print_word(int word);
|
|
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
|
|
|