Stepper-Motor-Control
v3.0.0
System on a Chip 2014 - Group 04
|
Collection of auxilary functions, mainly output functions. More...
#include "../INC/auxilaryFunctions.h"
Go to the source code of this file.
Functions | |
uint8_t | init_outputTaskDataTxRx (void) |
Initializes the interprocess communication between OutputTask and InputTask. More... | |
uint8_t | outputTaskDataTx (outputTaskData_t data) |
Sends data to ipc channel. More... | |
uint8_t | outputTaskDataRx (outputTaskData_t *data) |
Received data from ipc channel. More... | |
void | init_term (void) |
Initializes terminal output. More... | |
void | init_lcd (void) |
Initializes lcd output. More... | |
void | clear_lcd (void) |
Clears display. More... | |
void | setPos_lcd (int32_t row, int32_t col) |
Sets the cursor position on display. More... | |
void | setCursorMode_lcd (int32_t cursorMode) |
Sets the cursor-mode. More... | |
void | printf_term (const char *format,...) |
Writes formated string to terminal. More... | |
void | printf_lcd (const char *format,...) |
Writes formated string to lcd. More... | |
void | fflush_term () |
Writes buffed data to terminal. More... | |
void | fflush_lcd () |
Writes buffed data to lcd. More... | |
Variables | |
FILE * | term |
stream to write on terminal device | |
FILE * | lcd |
stream to write lcd device | |
outputTaskData_t | outputTaskData |
Variable for transmitting information from InputTask to OutputTask. | |
OS_EVENT * | outputTaskDataMutex |
Mutex for secured variable acces. | |
Collection of auxilary functions, mainly output functions.
v0.1.0 28.10.2014 Riedel & Kossmann
v0.1.1 31.10.2014 Riedel & Kossmann
v0.1.2 06.11.2014 Riedel
v1.0.0 06.11.2014 Riedel
v1.1.0 14.11.2014 Kossmann
v2.0.0 18.11.2014 Riedel & Kossmann
Definition in file auxilaryFunctions.c.
void clear_lcd | ( | void | ) |
Clears display.
Sends clear sequence to display.
none |
Definition at line 97 of file auxilaryFunctions.c.
void fflush_lcd | ( | ) |
Writes buffed data to lcd.
Writes any buffed data to lcd stream.
none |
Definition at line 127 of file auxilaryFunctions.c.
void fflush_term | ( | ) |
Writes buffed data to terminal.
Writes any buffed data to terminal stream.
none |
Definition at line 124 of file auxilaryFunctions.c.
void init_lcd | ( | void | ) |
Initializes lcd output.
Calling specific lcd init functions which sends initializisation sequence to lcd. Also opens stream to lcd-device in write mode.
none |
Definition at line 92 of file auxilaryFunctions.c.
uint8_t init_outputTaskDataTxRx | ( | void | ) |
Initializes the interprocess communication between OutputTask and InputTask.
Transmission is done via global variable and secured by mutex.
err | System wide error code |
Definition at line 37 of file auxilaryFunctions.c.
void init_term | ( | void | ) |
Initializes terminal output.
Opens stream to JTAG-UART-device in write mode.
none |
Definition at line 88 of file auxilaryFunctions.c.
uint8_t outputTaskDataRx | ( | outputTaskData_t * | data | ) |
Received data from ipc channel.
Reads data of global variable. outputTaskDataMutex
must be initialized before.
[out] | data | Pointer to the content of the global var. |
err | System wide error code. "OS_ERR_INVALID_OPT" means param was NULL. |
Definition at line 71 of file auxilaryFunctions.c.
uint8_t outputTaskDataTx | ( | outputTaskData_t | data | ) |
Sends data to ipc channel.
Stores data in global variable. outputTaskDataMutex
must be initialized before.
data | Data to store in global var. |
err | System wide error code. "OS_ERR_INVALID_OPT" means param was NULL. |
Definition at line 54 of file auxilaryFunctions.c.
void printf_lcd | ( | const char * | , |
... | |||
) |
Writes formated string to lcd.
Usage like common printf.
none |
Definition at line 117 of file auxilaryFunctions.c.
void printf_term | ( | const char * | , |
... | |||
) |
Writes formated string to terminal.
Usage like common printf.
none |
Definition at line 111 of file auxilaryFunctions.c.
void setCursorMode_lcd | ( | int32_t | cursorMode | ) |
Sets the cursor-mode.
cursorMode | new Cursor mode, can be
|
Definition at line 107 of file auxilaryFunctions.c.
void setPos_lcd | ( | int32_t | row, |
int32_t | col | ||
) |
Sets the cursor position on display.
The display supports 2 rows and 16 columns where the cursor can be set
row | The number of row to position. |
col | The number of col to position. |
Definition at line 102 of file auxilaryFunctions.c.