ugfx/src/gos/gos_nios.c

66 lines
917 B
C
Raw Normal View History

2015-11-27 19:39:23 +00:00
/*
* This file is subject to the terms of the GFX License. If a copy of
* the license was not distributed with this file, you can obtain one at:
*
2018-10-01 15:32:39 +00:00
* http://ugfx.io/license.html
2015-11-27 19:39:23 +00:00
*/
#include "../../gfx.h"
#if GFX_USE_OS_NIOS
void _gosHeapInit(void);
void _gosThreadsInit(void);
/*********************************************************
* Initialise
*********************************************************/
void _gosInit(void)
{
// Set up the heap allocator
_gosHeapInit();
// Start the scheduler
_gosThreadsInit();
}
void _gosPostInit(void)
{
}
2015-11-27 19:39:23 +00:00
void _gosDeinit(void)
{
}
void gfxHalt(const char *msg)
{
volatile gU32 dummy;
2015-11-27 19:39:23 +00:00
(void)msg;
while(1) {
dummy++;
}
}
void gfxExit(void) {
volatile gU32 dummy;
2015-11-27 19:39:23 +00:00
while(1) {
dummy++;
}
}
2015-12-04 21:33:12 +00:00
gTicks gfxSystemTicks(void)
2015-11-27 19:39:23 +00:00
{
2015-12-04 21:33:40 +00:00
return alt_nticks();
2015-11-27 19:39:23 +00:00
}
gTicks gfxMillisecondsToTicks(gDelay ms)
2015-11-27 19:39:23 +00:00
{
return ms;
}
#endif /* GFX_USE_OS_NIOS */