+/rtos
git clone https://git.julia.blue/+/rtos
822d761
master
1#include "OS.h" 2#include "interpreter.h" 3#include "mouse.h" 4#include "printf.h" 5#include "std.h" 6 7void local_interpreter (void ) { 8interpreter (false); 9} 10 11void trig_test (void ) { 12float x []= {- PI ,-3 * PI /4 ,- PI /2 ,- PI /4 ,0 , 13PI /4 ,PI /2 ,3 * PI /4 ,PI }; 14printf ("i x*1000 sin*1000 cos*1000\n\r" ); 15for (int i = 0 ;i < sizeof (x ) /sizeof (float );++ i ) { 16printf ("%-6d%-11d%-13d%-8d\n\r" ,i , (int32_t )(x [i ]* 1000 ), 17 (int32_t )(sin (x [i ])* 1000 ), (int32_t )(cos (x [i ])* 1000 )); 18 } 19} 20 21void main (void ) { 22OS_Init (); 23// OS_AddThread(trig_test, "trig", 512, 2); 24OS_AddThread (local_interpreter ,"debug shell" ,2048 ,2 ); 25OS_Launch (ms (10 )); 26}