Stepper-Motor-Control
v3.0.0
System on a Chip 2014 - Group 04
|
Header file for auxilaryFunctions.c. More...
#include <stdio.h>
#include <stdarg.h>
#include <system.h>
#include "includes.h"
#include "lcdDOGM162.h"
#include "altera_avalon_lcd_16207_regs.h"
#include "dataTypes.h"
Go to the source code of this file.
Macros | |
#define | VERSION "2.0.0" |
global version definition | |
#define | DATE "18.11.2014" |
global date definition | |
#define | MUTEX_PRIORITY 4 |
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 *,...) |
Writes formated string to terminal. More... | |
void | printf_lcd (const char *,...) |
Writes formated string to lcd. More... | |
void | fflush_term () |
Writes buffed data to terminal. More... | |
void | fflush_lcd () |
Writes buffed data to lcd. More... | |
Header file for auxilaryFunctions.c.
Contains defines, includes, typedefs and declarations needed for auxilary functions.
v0.1.0 22.10.2014 Kossmann
v0.1.1 27.10.2014 Riedel & Kossmann
v0.1.2 27.10.2014 Riedel & Kossmann
v0.1.3 03.11.2014 Kossmann
v1.0.1 14.11.2014 Kossmann
v2.0.0 18.11.2014 Riedel & Kossmann
Definition in file auxilaryFunctions.h.
#define MUTEX_PRIORITY 4 |
Priority for Mutexes
Definition at line 43 of file auxilaryFunctions.h.
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.