Data Structures | Macros | Typedefs | Enumerations | Functions
tice.h File Reference

Core CE define file. More...

#include <stdbool.h>
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  real_t
 Structure of real variable type. More...
 
struct  cplx_t
 Structure of complex variable type. More...
 
struct  list_t
 Structure of list variable type. More...
 
struct  cplx_list_t
 Structure of complex list variable type. More...
 
struct  matrix_t
 Structure of matrix variable type. More...
 
struct  string_t
 Structure of string variable type. More...
 
struct  equ_t
 Structure of equation variable type. More...
 
struct  var_t
 Structure of miscellaneous variable type. More...
 
struct  font
 Structure of font description. More...
 

Macros

#define randInt(min, max)
 
#define rtc_Time()
 
#define LCD_WIDTH
 
#define LCD_HEIGHT
 
#define LCD_SIZE
 
#define matrix_element(matrix, row, col)
 
#define os_ClrHome()
 
#define os_ClrHomeFull()
 
#define os_SmallFont
 
#define os_LargeFont
 
#define os_TextShadow
 
#define os_PenCol
 
#define os_PenRow
 
#define os_AsmPrgmSize
 
#define os_AppErr1
 
#define os_AppErr2
 
#define os_TempFreeArc
 
#define os_TextBGcolor
 
#define os_TextFGcolor
 
#define os_DrawBGColor
 
#define os_DrawFGColor
 
#define os_GraphBGColor
 
#define os_StatusBarBGColor
 
#define os_RamCode
 

Typedefs

typedef struct font font_t
 Structure of font description. More...
 
typedef uint8_t sk_key_t
 Scan code type.
 

Enumerations

enum  os_colors_t
 

Functions

uint32_t random (void)
 
void srandom (uint32_t seed)
 
void delay (uint16_t msec)
 
uint32_t atomic_load_32 (volatile uint32_t *p)
 
uint32_t atomic_load_increasing_32 (volatile uint32_t *p)
 
uint32_t atomic_load_decreasing_32 (volatile uint32_t *p)
 
void boot_SetDate (uint8_t day, uint8_t month, uint16_t year)
 
void boot_GetDate (uint8_t *day, uint8_t *month, uint16_t *year)
 
void boot_SetTime (uint8_t seconds, uint8_t minutes, uint8_t hours)
 
void boot_GetTime (uint8_t *seconds, uint8_t *minutes, uint8_t *hours)
 
bool boot_IsAfterNoon (void)
 
uint8_t boot_GetBootMajorVer (void)
 
uint8_t boot_GetBootMinorVer (void)
 
uint8_t boot_GetHardwareVer (void)
 
void boot_ClearVRAM (void)
 
bool boot_CheckOnPressed (void)
 
void boot_DebugPrintf (const char *string)
 
void boot_TurnOff (void)
 
void boot_NewLine (void)
 
uint8_t boot_GetBatteryStatus (void)
 
void boot_WaitShort (void)
 
void os_NewLine (void)
 
void os_DisableCursor (void)
 
void os_EnableCursor (void)
 
void os_SetDrawFGColor (uint24_t color)
 
uint24_t os_GetDrawFGColor (void)
 
void os_SetDrawBGColor (uint24_t color)
 
uint24_t os_GetDrawBGColor (void)
 
void os_SetCursorPos (uint8_t curRow, uint8_t curCol)
 
void os_GetCursorPos (unsigned int *curRow, unsigned int *curCol)
 
void os_FontSelect (font_t *font)
 
font_tos_FontGetID (void)
 
uint24_t os_FontGetWidth (const char *string)
 
uint24_t os_FontGetHeight (void)
 
uint24_t os_FontDrawText (const char *string, uint16_t col, uint8_t row)
 
uint24_t os_FontDrawTransText (const char *string, uint16_t col, uint8_t row)
 
uint24_t os_PutStrFull (const char *string)
 
uint24_t os_PutStrLine (const char *string)
 
void os_SetFlagByte (int offset, uint8_t set)
 
uint8_t os_GetFlagByte (int offset)
 
size_t os_MemChk (void **free)
 
void os_ThrowError (uint8_t error)
 
void * os_GetSystemStats (void)
 
int os_PushErrorHandler (void)
 
void os_PopErrorHandler (void)
 
void * os_GetSymTablePtr (void)
 
var_tos_CreateAppVar (const char *name, uint16_t size)
 
void * os_NextSymEntry (void *entry, uint24_t *type, uint24_t *nameLength, char *name, void **data)
 
int os_ChkFindSym (uint8_t type, const char *name, void **entry, void **data)
 
void * os_RclAns (uint8_t *type)
 
real_t os_RealCopy (const real_t *src)
 
real_t os_RealRound (const real_t *arg, char digits)
 
int os_RealCompare (const real_t *arg1, const real_t *arg2)
 
int24_t os_RealToInt24 (const real_t *arg)
 
real_t os_Int24ToReal (int24_t arg)
 
float os_RealToFloat (const real_t *arg)
 
real_t os_FloatToReal (float arg)
 
int os_RealToStr (char *result, const real_t *arg, int8_t maxLength, uint8_t mode, int8_t digits)
 
real_t os_StrToReal (const char *string, char **end)
 
int os_TestFlagBits (uint16_t offset_pattern)
 
void os_GetStringInput (char *string, char *buf, size_t bufsize)
 
uint16_t os_GetKey (void)
 
void os_DisableHomeTextBuffer (void)
 
void os_EnableHomeTextBuffer (void)
 
sk_key_t os_GetCSC (void)
 
void boot_Set6MHzMode (void)
 
void boot_Set48MHzMode (void)
 
void boot_Set6MHzModeI (void)
 
void boot_Set48MHzModeI (void)
 
void os_ForceCmdNoChar (void)
 
void _OS (void(*function)(void))
 
void asm_MoveUp (void)
 
void asm_MoveDown (void)
 
void asm_HomeUp (void)
 
void asm_RunIndicOn (void)
 
void asm_RunIndicOff (void)
 
void asm_DisableAPD (void)
 
void asm_EnableAPD (void)
 
void asm_ArcChk (void)
 
void asm_ClrLCDFull (void)
 
void asm_ClrLCD (void)
 
void asm_DrawStatusBar (void)
 
void asm_DelRes (void)
 
void asm_ClrTxtShd (void)
 

Detailed Description

Core CE define file.

Authors
Matt "MateoConLechuga" Waltz
Jacob "jacobly" Young

Macro Definition Documentation

◆ LCD_HEIGHT

#define LCD_HEIGHT

Height of LCD in pixels

◆ LCD_SIZE

#define LCD_SIZE

Total number of pixels in LCD

◆ LCD_WIDTH

#define LCD_WIDTH

Width of LCD in pixels

◆ matrix_element

#define matrix_element (   matrix,
  row,
  col 
)

Gets an element from a matrix

Parameters
matrixStructure of matrix
rowRow in matrix
colColumn in matrix
Returns
real_t containing element data

◆ os_AppErr1

#define os_AppErr1

String [1] for custom error

◆ os_AppErr2

#define os_AppErr2

String [2] for custom error

◆ os_AsmPrgmSize

#define os_AsmPrgmSize

Current size of executing program

◆ os_ClrHome

#define os_ClrHome ( )

Resets the OS homescreen; accounts for split screen

◆ os_ClrHomeFull

#define os_ClrHomeFull ( )

Resets the OS homescreen fully

◆ os_DrawBGColor

#define os_DrawBGColor

Small font background color

◆ os_DrawFGColor

#define os_DrawFGColor

Small font foreground color

◆ os_GraphBGColor

#define os_GraphBGColor

Graph background 565 color

◆ os_LargeFont

#define os_LargeFont

TIOS large font.

See also
os_SelectFont

◆ os_PenCol

#define os_PenCol

Small font column location

◆ os_PenRow

#define os_PenRow

Small font row location

◆ os_RamCode

#define os_RamCode

1023 bytes free ram

◆ os_SmallFont

#define os_SmallFont

TIOS small font.

See also
os_SelectFont

◆ os_StatusBarBGColor

#define os_StatusBarBGColor

Status bar 565 color

◆ os_TempFreeArc

#define os_TempFreeArc

Set after asm_ArcChk call

◆ os_TextBGcolor

#define os_TextBGcolor

Large font background color

◆ os_TextFGcolor

#define os_TextFGcolor

Large font foreground color

◆ os_TextShadow

#define os_TextShadow

Text buffer 260 bytes

◆ randInt

#define randInt (   min,
  max 
)

Returns a pseudo-random integer in the range of min to max (inclusive).

◆ rtc_Time

#define rtc_Time ( )

Gets a combination of the RTC time; useful for srand()

Typedef Documentation

◆ font_t

typedef struct font font_t

Structure of font description.

See also
os_SelectFont

Enumeration Type Documentation

◆ os_colors_t

Colors used by the OS

Function Documentation

◆ _OS()

void _OS ( void(*)(void)  function)

Use this function to call assembly functions in the OS and Bootcode i.e. _OS( asm_ArcChk );

◆ asm_ArcChk()

void asm_ArcChk ( void  )

Assembly routine checks the amount of free archive

◆ asm_ClrLCD()

void asm_ClrLCD ( void  )

Assembly routine to clear the homescreen lcd. Accounts for split screen

◆ asm_ClrLCDFull()

void asm_ClrLCDFull ( void  )

Assembly routine to clear the homescreen lcd

◆ asm_ClrTxtShd()

void asm_ClrTxtShd ( void  )

Invalidate and clear text shadow area

◆ asm_DelRes()

void asm_DelRes ( void  )

Invalidate and clear stat variables

◆ asm_DisableAPD()

void asm_DisableAPD ( void  )

Assembly routine to turn off APD

◆ asm_DrawStatusBar()

void asm_DrawStatusBar ( void  )

Assembly routine to redraw the status bar

◆ asm_EnableAPD()

void asm_EnableAPD ( void  )

Assembly routine to turn on APD

◆ asm_HomeUp()

void asm_HomeUp ( void  )

Assembly routine to move row and column posistion to (0,0)

◆ asm_MoveDown()

void asm_MoveDown ( void  )

Assembly routine to scroll homescreen down

◆ asm_MoveUp()

void asm_MoveUp ( void  )

Assembly routine to scroll homescreen up

◆ asm_RunIndicOff()

void asm_RunIndicOff ( void  )

Assembly routine to turn off the Run Indicator

◆ asm_RunIndicOn()

void asm_RunIndicOn ( void  )

Assembly routine to turn on the Run Indicator

◆ atomic_load_32()

uint32_t atomic_load_32 ( volatile uint32_t *  p)

"Atomically" loads from a volatile 32-bit value.

Remarks
The hardware does not provide a mechanism to truly atomically load from a 32-bit value. This "atomic" load is implemented by non-atomically reading the value twice and retrying if the values read differ.
Attention
If the maximum period between two value changes is 1us or less (assuming a CPU clock speed of 48MHz), then this function may never complete. For instance, the counter of a timer ticking at 1MHz or more should not be read using this function. In such a case of a purely increasing or decreasing value, atomic_load_increasing_32() or atomic_load_decreasing_32() may be appropriate instead.
Parameters
ppointer to 32-bit value

◆ atomic_load_decreasing_32()

uint32_t atomic_load_decreasing_32 ( volatile uint32_t *  p)

"Atomically" loads from a volatile, decreasing 32-bit value.

Remarks
The hardware does not provide a mechanism to truly atomically load from a 32-bit value. This "atomic" load is implemented by temporarily disabling interrupts while non-atomically reading the value twice and then returning the greater of the two values read.
Attention
If the minimum period between two value changes is 5us or less and the value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU clock speed of 48MHz), then the value returned may be incorrect. Of relevant note may be the fact that a 48MHz counter does not exceed this limit.
Parameters
ppointer to 32-bit value

◆ atomic_load_increasing_32()

uint32_t atomic_load_increasing_32 ( volatile uint32_t *  p)

"Atomically" loads from a volatile, increasing 32-bit value.

Remarks
The hardware does not provide a mechanism to truly atomically load from a 32-bit value. This "atomic" load is implemented by temporarily disabling interrupts while non-atomically reading the value twice and then returning the lesser of the two values read.
Attention
If the minimum period between two value changes is 5us or less and the value's maximum rate of change over a 5us period exceeds 256 (assuming a CPU clock speed of 48MHz), then the value returned may be incorrect. Of relevant note may be the fact that a 48MHz counter does not exceed this limit.
Parameters
ppointer to 32-bit value

◆ boot_CheckOnPressed()

bool boot_CheckOnPressed ( void  )

Checks if the [on] key was pressed

Returns
True is returned if [on] key was pressed

◆ boot_ClearVRAM()

void boot_ClearVRAM ( void  )

Turns all of VRAM into 0xFF (white)

◆ boot_DebugPrintf()

void boot_DebugPrintf ( const char *  string)

Basically a reimplemented form of printf that prints to some debugging device

Parameters
stringString to send to debug device

◆ boot_GetBatteryStatus()

uint8_t boot_GetBatteryStatus ( void  )
Returns
Current battery status

◆ boot_GetBootMajorVer()

uint8_t boot_GetBootMajorVer ( void  )
Returns
Bootcode version major

◆ boot_GetBootMinorVer()

uint8_t boot_GetBootMinorVer ( void  )
Returns
Bootcode version minor

◆ boot_GetDate()

void boot_GetDate ( uint8_t *  day,
uint8_t *  month,
uint16_t *  year 
)

Gets the calculator's date

Parameters
dayPointer to variable to store day
monthPointer to variable to store month
yearPointer to variable to store year

◆ boot_GetHardwareVer()

uint8_t boot_GetHardwareVer ( void  )
Returns
Hardware version

◆ boot_GetTime()

void boot_GetTime ( uint8_t *  seconds,
uint8_t *  minutes,
uint8_t *  hours 
)

Gets the calculator's time

Parameters
secondsPointer to variable to store seconds
minutesPointer to variable to store minutes
hoursPointer to variable to store hours

◆ boot_IsAfterNoon()

bool boot_IsAfterNoon ( void  )

Checks if past noon

Returns
True if past noon

◆ boot_NewLine()

void boot_NewLine ( void  )

Inserts a new line at the current cursor posistion on the homescreen Does not scroll.

◆ boot_Set48MHzMode()

void boot_Set48MHzMode ( void  )

Runs the calulator at 48 MHz

◆ boot_Set48MHzModeI()

void boot_Set48MHzModeI ( void  )

Runs the calulator at 48 MHz (saves interrupt status)

◆ boot_Set6MHzMode()

void boot_Set6MHzMode ( void  )

Runs the calulator at 6 MHz

◆ boot_Set6MHzModeI()

void boot_Set6MHzModeI ( void  )

Runs the calulator at 6 MHz (saves interrupt status)

◆ boot_SetDate()

void boot_SetDate ( uint8_t  day,
uint8_t  month,
uint16_t  year 
)

Sets the calculator's date

Performs checks to ensure date is within range

Parameters
dayDay to set
monthMonth to set
yearYear to set

◆ boot_SetTime()

void boot_SetTime ( uint8_t  seconds,
uint8_t  minutes,
uint8_t  hours 
)

Sets the calculator's time

Performs checks to ensure time is within range

Parameters
secondsSeconds to set
minutesMinutes to set
hoursHours to set

◆ boot_TurnOff()

void boot_TurnOff ( void  )

Turns off the calculator (probably not a good idea to use)

◆ boot_WaitShort()

void boot_WaitShort ( void  )

Waits for ~10 ms

◆ delay()

void delay ( uint16_t  msec)

Delays for a number of milliseconds.

Counts time spent while interrupted. Assumes a CPU clock speed of 48MHz.

Parameters
msecnumber of milliseconds

◆ os_ChkFindSym()

int os_ChkFindSym ( uint8_t  type,
const char *  name,
void **  entry,
void **  data 
)

Locates a symbol in the symtable

Parameters
typeType of symbol to find
namePointer to name of symbol to find
entryCan be NULL if you don't care
dataCan be NULL if you don't care
Returns
If file exists, returns 1 and sets entry and data, otherwise returns 0.

◆ os_CreateAppVar()

var_t* os_CreateAppVar ( const char *  name,
uint16_t  size 
)

Creates an AppVar

Parameters
namePointer to name of AppVar to create
sizeSize of AppVar to create
Returns
A pointer to the AppVar data
Note
Returns NULL if creation failed for some reason, otherwise a pointer to the size bytes

◆ os_DisableCursor()

void os_DisableCursor ( void  )

Disables the OS cursor

◆ os_DisableHomeTextBuffer()

void os_DisableHomeTextBuffer ( void  )

Disable text buffering on the homescreen. C programs use this area by default for the BSS / Heap.

◆ os_EnableCursor()

void os_EnableCursor ( void  )

Enables the OS cursor

◆ os_EnableHomeTextBuffer()

void os_EnableHomeTextBuffer ( void  )

Enables text buffering on the homescreen. C programs use this area by default for the BSS / Heap.

◆ os_FloatToReal()

real_t os_FloatToReal ( float  arg)

Converts an float to a real_t

Note
Saturates on overflow

◆ os_FontDrawText()

uint24_t os_FontDrawText ( const char *  string,
uint16_t  col,
uint8_t  row 
)

Draws text using the small font to the screen

Parameters
stringString to draw
colColumn to start drawing at
rowRow to start drawing at
Returns
The end column

◆ os_FontDrawTransText()

uint24_t os_FontDrawTransText ( const char *  string,
uint16_t  col,
uint8_t  row 
)

Draws transparent text using the small font to the screen

Parameters
stringString to draw
colColumn to start drawing at
rowRow to start drawing at
Returns
The end column

◆ os_FontGetHeight()

uint24_t os_FontGetHeight ( void  )
Returns
The height of the font characters

◆ os_FontGetID()

font_t* os_FontGetID ( void  )

Gets the font to use when drawing on the graphscreen

Returns
0: small font
1: large monospace font

◆ os_FontGetWidth()

uint24_t os_FontGetWidth ( const char *  string)
Parameters
stringString to get pixel width of
Returns
The width of a string in the variable-width format

◆ os_FontSelect()

void os_FontSelect ( font_t font)

Selects the font to use when drawing on the graphscreen

Parameters
id0: small font
1: large monospace font

◆ os_ForceCmdNoChar()

void os_ForceCmdNoChar ( void  )

Executes the assembly routine _ForceCmdNoChar

◆ os_GetCSC()

sk_key_t os_GetCSC ( void  )

Performs an OS call to get the keypad scan code

You can also use this function to get input from the user as a string like this:

const char *chars = "\0\0\0\0\0\0\0\0\0\0\"WRMH\0\0?[VQLG\0\0:ZUPKFC\0 YTOJEB\0\0XSNIDA\0\0\0\0\0\0\0\0";
uint8_t key, i = 0;
char buffer[50];
while((key = os_GetCSC()) != sk_Enter) {
if(chars[key]) {
buffer[i++] = chars[key];
}
}

Feel free to modify the string to suit your needs.

Returns
Key scan code

◆ os_GetCursorPos()

void os_GetCursorPos ( unsigned int *  curRow,
unsigned int *  curCol 
)

Gets the cursor posistion used on the homescreen

Parameters
curRowPointer to store the row aligned offset
curColPointer to store the column aligned offset

◆ os_GetDrawBGColor()

uint24_t os_GetDrawBGColor ( void  )

Gets the background color used to draw text on the graphscreen

Returns
565 BGR color of text nackground
Warning
Only useable in OS 5.2 and above; use at your own risk

◆ os_GetDrawFGColor()

uint24_t os_GetDrawFGColor ( void  )

Gets the foreground color used to draw text on the graphscreen

Returns
565 BGR color of text foreground

◆ os_GetFlagByte()

uint8_t os_GetFlagByte ( int  offset)

Get a particular flag variable

Parameters
offsetOffset to particular flag in list
Returns
Bitmask of flag

◆ os_GetKey()

uint16_t os_GetKey ( void  )

Gets a key from the OS

Returns
Key code
Extended key code in high byte

◆ os_GetStringInput()

void os_GetStringInput ( char *  string,
char *  buf,
size_t  bufsize 
)

Custom implementation input routine for use in conjunction with the TIOS. It is HIGHLY recommended you implement your own routine, this routine has some quirks. It is good enough for getting basic input however.

Parameters
stringInput prompt string to be displayed to the user
bufStorage location to store input string
bufsizeAvailable storage size for input string. -1 for null termination.
Returns
None

◆ os_GetSymTablePtr()

void* os_GetSymTablePtr ( void  )
Returns
A pointer to symtable of the OS

◆ os_GetSystemStats()

void* os_GetSystemStats ( void  )

Gets a pointer to the system stats

Returns
[3] - Hardware version
[12-13] - Boot Version Major
[14] - Boot Version Minor
[15-16] - Boot Version Build
[28-37] - Calc ID (From certificate if exists)
[38-39] - Appears to be localization language

◆ os_Int24ToReal()

real_t os_Int24ToReal ( int24_t  arg)

Converts an integer to a real_t

Note
Saturates on overflow

◆ os_MemChk()

size_t os_MemChk ( void **  free)

Get amount of free ram in order to allocate extra ram

Parameters
freeSet to start of free available ram
Returns
Size of available ram

◆ os_NewLine()

void os_NewLine ( void  )

Inserts a new line at the current cursor posistion on the homescreen Does scroll.

◆ os_NextSymEntry()

void* os_NextSymEntry ( void *  entry,
uint24_t *  type,
uint24_t *  nameLength,
char *  name,
void **  data 
)

Returns next entry or NULL if no more entries, pass os_GetSymTablePtr() as first entry

◆ os_PopErrorHandler()

void os_PopErrorHandler ( void  )

Restores stack state after a call to os_PushErrorHandler. Must be called with stack in the same state as it was when os_PushErrorHandler returned with 0, and should not be called along the error path.

See also
os_PushErrorHandler

◆ os_PushErrorHandler()

int os_PushErrorHandler ( void  )

This function can return twice (like setjmp). First return always happens with a return value of 0. Second return only happens if an error occurs before os_PopErrorHandler is called, with the errNo as the return value.

int errno = os_PushErrorHandler();
if (errno) {
// handle error, but no longer under the protection of the error handler so do not call os_PopErrorHandler()
} else {
// run some code that may error
}
Parameters
routineError handling routine
See also
os_PopErrorHandler

◆ os_PutStrFull()

uint24_t os_PutStrFull ( const char *  string)

Puts some text at the current homescreen cursor location

Parameters
stringTest to put on homescreen
Returns
1 if string fits on screen, 0 otherwise

◆ os_PutStrLine()

uint24_t os_PutStrLine ( const char *  string)

Puts some text at the current homescreen cursor location

Parameters
stringTest to put on homescreen
Returns
1 if string fits on line, 0 otherwise

◆ os_RclAns()

void* os_RclAns ( uint8_t *  type)

Gets the Ans variable

Parameters
typeThis is set to the current variable type in ANS
Returns
Pointer to the data
Note
Returns NULL if Ans doesn't exist or type is NULL

◆ os_RealCompare()

int os_RealCompare ( const real_t arg1,
const real_t arg2 
)

Compares two real_t

Returns
-1, 0, or 1 depending on the comparison

◆ os_RealCopy()

real_t os_RealCopy ( const real_t src)

Copies a real_t type

Parameters
srcPointer to original real_t
Returns
Copied real_t

◆ os_RealRound()

real_t os_RealRound ( const real_t arg,
char  digits 
)

Rounds a real_t

Note
digits must be in the range 0 - 9

◆ os_RealToFloat()

float os_RealToFloat ( const real_t arg)

Converts a real_t to a float

Note
Saturates on overflow

◆ os_RealToInt24()

int24_t os_RealToInt24 ( const real_t arg)

Converts a real_t to an integer

Note
Saturates on overflow

◆ os_RealToStr()

int os_RealToStr ( char *  result,
const real_t arg,
int8_t  maxLength,
uint8_t  mode,
int8_t  digits 
)

This converts a ti-float to a ti-ascii string.

Parameters
resultZero terminated string copied to this address
argReal to convert
maxLength<=0: use default max length (14)
>0: max length of result, minimum of 6
mode0: Use current mode for everything (digits ignored)
1: Normal mode
2: Sci mode
3: Eng mode
>4: Use current Normal/Sci/Eng mode (digits still used)
digits-1: Float mode
0-9: Fix # mode
Returns
Length of result

◆ os_SetCursorPos()

void os_SetCursorPos ( uint8_t  curRow,
uint8_t  curCol 
)

Set the cursor posistion used on the homescreen

Parameters
curRowThe row aligned offset
curColThe column aligned offset

◆ os_SetDrawBGColor()

void os_SetDrawBGColor ( uint24_t  color)

Sets the background color used to draw text on the graphscreen

Parameters
color565 BGR color to set text background to

◆ os_SetDrawFGColor()

void os_SetDrawFGColor ( uint24_t  color)

Sets the foreground color used to draw text on the graphscreen

Parameters
color565 BGR color to set text foreground to

◆ os_SetFlagByte()

void os_SetFlagByte ( int  offset,
uint8_t  set 
)

Set a particular flag variable

Parameters
offsetOffset to particular flag in list
setBitmask of flag to set

◆ os_StrToReal()

real_t os_StrToReal ( const char *  string,
char **  end 
)

This converts a ti-ascii string to a ti-float.

String format regexp: / [-\032+]?[0-9](.[0-9]*)?([eE\033][-\032+]?[0-9]*)?/

Parameters
stringTI-ascii string to convert
endIf non-null, pointer to end of parsed number is stored here
Returns
resulting TI-float; on exponent overflow this is +-9.9999999999999e99

◆ os_TestFlagBits()

int os_TestFlagBits ( uint16_t  offset_pattern)

High 8 is unsigned offset, low 8 is bits to test

◆ os_ThrowError()

void os_ThrowError ( uint8_t  error)

Throws an OS error

Parameters
errorError code to throw

◆ random()

uint32_t random ( void  )

Returns a pseudo-random 32-bit integer.

Returns
the random integer

◆ srandom()

void srandom ( uint32_t  seed)

Seeds the pseudo-random number generator used by random() and rand() with the value seed.

Parameters
seedthe seed value