URL
https://opencores.org/ocsvn/mlite/mlite/trunk
[/] [mlite/] [trunk/] [tools/] [no_os.c] - Diff between revs 270 and 336
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 270 |
Rev 336 |
Line 1... |
Line 1... |
#include "plasma.h"
|
#include "plasma.h"
|
|
|
#define MemoryRead(A) (*(volatile unsigned int*)(A))
|
#define MemoryRead(A) (*(volatile unsigned int*)(A))
|
#define MemoryWrite(A,V) *(volatile unsigned int*)(A)=(V)
|
#define MemoryWrite(A,V) *(volatile unsigned int*)(A)=(V)
|
|
|
void putchar(int value)
|
int putchar(int value)
|
{
|
{
|
while((MemoryRead(IRQ_STATUS) & IRQ_UART_WRITE_AVAILABLE) == 0)
|
while((MemoryRead(IRQ_STATUS) & IRQ_UART_WRITE_AVAILABLE) == 0)
|
;
|
;
|
MemoryWrite(UART_WRITE, value);
|
MemoryWrite(UART_WRITE, value);
|
|
return 0;
|
}
|
}
|
|
|
int puts(const char *string)
|
int puts(const char *string)
|
{
|
{
|
while(*string)
|
while(*string)
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.