Files | |
| file | output.c |
| Display and LED routines for output status of eWicht. | |
| file | output.h |
| Output module defines and global function prototypes for eWicht. | |
Modules | |
| Display commands | |
| Display commands which can be sent to the LCD via the lcd_status variable. | |
| LED masks | |
| Masks for LED access. | |
Defines | |
| #define | LCD_CHARS_IN_A_ROW 16 |
| Defines the count of maximum characters per display row. | |
| #define | LED_BLINK_INTERVAL 1u |
| The time of the blinking interval of an LED in LED_BLINK mode in seconds. | |
Enumerations | |
| enum | eLED_Modes { LED_ON = 0, LED_OFF, LED_BLINK, LED_TOGGLE } |
| Modes for LED access. More... | |
Functions | |
| void | OutInit (void) |
| Initializes the display and LEDs. | |
| void | OutMain (void) |
| Handles the display access and LED blinking if enabled. | |
| void | OutDebugOut (BYTE u8Value) |
| The function displays the given value at the LEDs. | |
| void | OutSwitchOffLCD (void) |
| The function turns off the backlight of the LCD and the LCD itself. | |
| void | OutSwitchLCDBacklight (BOOL On) |
| The function turns the backlight of the LCD on or off. | |
| BOOL | OutIsLCDBusy (void) |
| The function determines, if all commands are handled by the display and the appropriate actions are done. | |
| void | OutEnableCursor (BOOL On) |
| The function enables the cursor in the display. | |
| void | OutSetCursor (BYTE Column, BYTE Row) |
| The function sets the position of the cursor independently of the visibility of the cursor. | |
| void | OutSwitchOffAllLEDs (void) |
| All button LEDs will be turned off. | |
| void | OutSetLED (BYTE LedMask, eLED_Modes Mode) |
| Gives access to the LEDs. | |
| void | OutSetLEDMask (BYTE LedMask, BYTE LedSwitchMask) |
| Gives boolean access to the LEDs via a switch mask. | |
| void | OutTriggerDisplay (void) |
| Retriggers the time the LCD backlight stays on. | |
| eLED_Modes | OutGetLEDMode (BYTE Led) |
| Obtain the mode of the specified LED. | |
| void | OutConvertNameForDisplay (BYTE *pString) |
| Converts a string from the website to the display encoding. | |
Variables | |
| BYTE | lcd_status |
| This byte is the global access to send commands to the display and get knowledge about the state of the LCD. | |
| #define LCD_CHARS_IN_A_ROW 16 |
| enum eLED_Modes |
Modes for LED access.
| LED_ON | Turns the LED on. |
| LED_OFF | Turns the LED off. |
| LED_BLINK | Starts blinkink the LED in a LED_BLINK_INTERVAL interval. |
| LED_TOGGLE | Toggles the LED. |
| void OutConvertNameForDisplay | ( | BYTE * | pString | ) |
| void OutDebugOut | ( | BYTE | u8Value | ) |
The function displays the given value at the LEDs.
The appropriate digits can be taken from LED masks.
| u8Value | The value to display on the LEDs. |
| void OutEnableCursor | ( | BOOL | On | ) |
The function enables the cursor in the display.
The cursor occurs as a underscore at the current cursor position.
| On | If TRUE the cursor will be enabled and therefore visible. If FALSE the cursor will be disabled and not visible anymore. |
| eLED_Modes OutGetLEDMode | ( | BYTE | Led | ) |
Obtain the mode of the specified LED.
| Led | A bit mask which specifies the LED to access. See LED masks for possible mask values. Only the mask value for one LED is possible. |
| void OutInit | ( | void | ) |
| BOOL OutIsLCDBusy | ( | void | ) |
| void OutMain | ( | void | ) |
| void OutSetCursor | ( | BYTE | Column, | |
| BYTE | Row | |||
| ) |
The function sets the position of the cursor independently of the visibility of the cursor.
| Column | Specify the column of the position. For the eWicht display that must be a value inbetween 0 and 15 (including). | |
| Row | Specify the row of the position. For the eWicht display that must be a value inbetween 0 and 1 (including). |
| void OutSetLED | ( | BYTE | LedMask, | |
| eLED_Modes | Mode | |||
| ) |
| void OutSetLEDMask | ( | BYTE | LedMask, | |
| BYTE | LedSwitchMask | |||
| ) |
Gives boolean access to the LEDs via a switch mask.
| LedMask | A bit mask which specifies the LEDs to access. See LED masks for possible mask values. | |
| LedSwitchMask | A '1' in this mask means LED on, a '0' means LED off. Each set bit in the u8LedMask parameter leads to a LED change. All other LEDs remain unchanged. |
| void OutSwitchLCDBacklight | ( | BOOL | On | ) |
| void OutSwitchOffAllLEDs | ( | void | ) |
| void OutSwitchOffLCD | ( | void | ) |
| void OutTriggerDisplay | ( | void | ) |
Retriggers the time the LCD backlight stays on.
If the backlight is already switched off it is turned on again. See LCD_IDLE_TIME for more details.
| BYTE lcd_status |
This byte is the global access to send commands to the display and get knowledge about the state of the LCD.
See Display commands for a detailed description of the supported commands.
1.5.5