Library Functions.
More...
Library Functions.
| void TM_STDIO_SetInputFunction |
( |
FILE * |
f, |
|
|
int(*)(FILE *) |
inputFuncPointer |
|
) |
| |
Links file input stream with input get character function.
- Parameters
-
| *f | Pointer to file stream |
| *inputFuncPointer | Pointer to function to be used for input data from stream |
- Return values
-
| void TM_STDIO_SetOutputFunction |
( |
FILE * |
f, |
|
|
int(*)(int, FILE *) |
outputFuncPointer |
|
) |
| |
Links file output stream with output put character function.
- Parameters
-
| *f | Pointer to file stream |
| *outputFuncPointer | Pointer to function to be used to output data to stream |
- Return values
-
| int TM_STDIO_StdinHandler |
( |
FILE * |
f | ) |
|
Default input handler for standard input (stdin)
- Note
- Needs to be implemented by user if you want to use getc or gets functions
- Parameters
-
- Return values
-
| Success | status:
- -1: No data available
- character: Return character value
|
- Note
- With __weak parameter to prevent link errors if not defined by user
| int TM_STDIO_StdoutHandler |
( |
int |
c, |
|
|
FILE * |
f |
|
) |
| |
Default output handler for standard output (stdout)
- Note
- Needs to be implemented by user if you want to use printf function
- Parameters
-
| c | character to output to stream |
| *f | Pointer to file stream |
- Return values
-
| Success | status:
- -1: Stop writing any data
- character: Return back the same character as was passed as parameter to continue with more characters if needed
|
- Note
- With __weak parameter to prevent link errors if not defined by user