URL
https://opencores.org/ocsvn/plasma/plasma/trunk
[/] [plasma/] [trunk/] [kernel/] [uart.c] - Diff between revs 400 and 402
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 400 |
Rev 402 |
Line 495... |
Line 495... |
MemoryWrite(GPIO0_OUT, value & mask); //set LEDs
|
MemoryWrite(GPIO0_OUT, value & mask); //set LEDs
|
}
|
}
|
|
|
|
|
/******************************************/
|
/******************************************/
|
int puts(const char *string)
|
int OS_puts(const char *string)
|
{
|
{
|
uint8 *ptr;
|
uint8 *ptr;
|
OS_SemaphorePend(SemaphoreUart, OS_WAIT_FOREVER);
|
OS_SemaphorePend(SemaphoreUart, OS_WAIT_FOREVER);
|
ptr = (uint8*)string;
|
ptr = (uint8*)string;
|
while(*ptr)
|
while(*ptr)
|
Line 511... |
Line 511... |
OS_SemaphorePost(SemaphoreUart);
|
OS_SemaphorePost(SemaphoreUart);
|
return 0;
|
return 0;
|
}
|
}
|
|
|
|
|
int getch(void)
|
int OS_getch(void)
|
{
|
{
|
return BufferRead(ReadBuffer, 1);
|
return BufferRead(ReadBuffer, 1);
|
}
|
}
|
|
|
|
|
int kbhit(void)
|
int OS_kbhit(void)
|
{
|
{
|
return ReadBuffer->read != ReadBuffer->write;
|
return ReadBuffer->read != ReadBuffer->write;
|
}
|
}
|
|
|
|
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.