Nspire I/O  2.0
 All Data Structures Files Functions Variables
nspireio2.h
Go to the documentation of this file.
00001 
00023 #include <os.h>
00024 
00025 #ifndef NSPIREIO2_H
00026 #define NSPIREIO2_H
00027 
00029 struct nio_console
00030 {
00031         char* data; 
00032         char* color; 
00033         int cursor_x; 
00034         int cursor_y; 
00035         int max_x; 
00036         int max_y; 
00037         int offset_x; 
00038         int offset_y; 
00039         char default_background_color; 
00040         char default_foreground_color; 
00041         BOOL drawing_enabled; 
00042 };
00043 typedef struct nio_console nio_console;
00044 
00049 void nio_load(char* path, nio_console* c);
00050 
00055 void nio_save(char* path, nio_console* c);
00056 
00062 void setPixel(int x, int y, unsigned int color);
00063 
00071 void putChar(int x, int y, char ch, int bgColor, int textColor);
00072 
00080 void putStr(int x, int y, char* str, int bgColor, int textColor);
00081 
00091 void nio_drawstr(int offset_x, int offset_y, int x, int y, char *str, char bgColor, char textColor);
00092 
00102 void nio_drawch(int offset_x, int offset_y, int x, int y, char ch, char bgColor, char textColor);
00103 
00107 char nio_getch(void);
00108 
00118 void nio_InitConsole(nio_console* c, int size_x, int size_y, int offset_x, int offset_y, char background_color, char foreground_color);
00119 
00123 void nio_DrawConsole(nio_console* c);
00124 
00128 void nio_ScrollDown(nio_console* c);
00129 
00133 void nio_Clear(nio_console* c);
00134 
00140 void nio_DrawChar(nio_console* c, int pos_x, int pos_y);
00141 
00148 void nio_SetChar(nio_console* c, char ch, int pos_x, int pos_y);
00149 
00154 void nio_PrintChar(nio_console* c, char ch);
00155 
00160 void nio_EnableDrawing(nio_console* c, BOOL drawing_enabled);
00161 
00166 void nio_PrintStr(nio_console* c, char* str);
00167 
00173 void nio_printf(nio_console* c, char *format, ...);
00174 
00179 char nio_GetChar(nio_console* c);
00180 
00185 int nio_GetStr(nio_console* c, char* str);
00186 
00192 void nio_SetColor(nio_console* c, char background_color, char foreground_color);
00193 
00197 void nio_CleanUp(nio_console* c);
00198 
00205 int reg_store(void* dataptr, size_t size, char* regpath);
00206 
00211 void* reg_get(char* regpath);
00212 
00216 BOOL uart_ready(void);
00217 
00221 char uart_getc(void);
00222 
00226 void uart_getline(char* dest);
00227 
00231 void uart_putc(char c);
00232 
00236 void uart_puts(const char *str);
00237 
00242 void uart_printf(char *format, ...);
00243 
00244 
00245 #endif