📄 dispdrv.h
字号:
/************************************************
*
* $Copyright 2001 Joseph J. Lemieux ALL RIGHTS RESERVED. $
*
* $Filename: C:\OSEKBook\src\CH13\inc\dispdrv.h $
*
* Description: Display Driver Header Files
*
************************************************/
#ifndef DISPDRVH
#define DISPDRVH
#include "typedefs.h"
/***
*
* Global Macros
*
***/
#define DISPLAY_CONTROL_LOCATION (UINT8 *)0x02000000
#define DISPLAY_BUFFER_LOCATION (UINT8 *)0x02000001
#define MAX_DISPLAY_ROWS 4
#define MAX_DISPLAY_LINE_LENGTH 20
#define ROW_TRANSLATION 0,2,1,3
#define DISPLAY_BUFFER_SIZE ((UINT8)16)
typedef struct DISPLAY_MESSAGE_TYPEtag {
char message[MAX_DISPLAY_ROWS*MAX_DISPLAY_LINE_LENGTH];
}DISPLAY_MESSAGE_TYPE;
/************************************************
*
* Function: InitDisplay
*
* Inputs: type - type of initialization occurring.
*
* Outputs: none
*
* Returns: none
*
* Description: Initializes the display and prepares for
* output. Sends startup message InitMessage.
*
************************************************/
void InitDisplay(InitType);
/************************************************
*
* Function: WriteDisplayAt
*
* Inputs: row, column - row/column to which to
* begin writing the text.
* text - reference to null terminated
* string of text to be output.
*
* Outputs: Adds text string to buffer.
*
* Returns: TRUE if successful, FALSE otherwise
*
* Description: Checks buffer for room for message.
* If room exists, copies row and column
* to buffer, increments buffer, and
* activates task OutputDisplay to actually
* output the data to the display.
*
************************************************/
BOOLEAN WriteDisplayAt(UINT8 row, UINT8 column, const char * text);
/************************************************
*
* Function: WriteDisplay
*
* Inputs: text - reference to null terminated
* string of text to be output.
*
* Outputs: Adds text string to buffer.
*
* Returns: TRUE if successful, FALSE otherwise
*
* Description: Calls WriteDisplayAt with row and
* column set to 0xFF, which indicates
* current row.
*
************************************************/
BOOLEAN WriteDisplay(const char * text);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -