DisplayUart2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020-2021, Texas Instruments Incorporated
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
128 #ifndef ti_display_DisplayUart2__include
129 #define ti_display_DisplayUart2__include
130 
131 #include <ti/drivers/dpl/SemaphoreP.h>
132 #include <ti/drivers/UART2.h>
133 #include <ti/display/Display.h>
134 #include <stdint.h>
135 
136 /* Line number that means 'put in scrolling section', if exists */
137 #define DisplayUart2_SCROLLING 0xFF
138 
141 
151 typedef struct
152 {
154  unsigned int uartIdx;
156  unsigned int baudRate;
158  unsigned int mutexTimeout;
160  char *strBuf;
162  uint16_t strBufLen;
164 
170 typedef struct
171 {
173  SemaphoreP_Handle mutex;
176 
179 
182 
185 
186 void DisplayUart2Min_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine);
187 void DisplayUart2Ansi_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine);
188 
189 void DisplayUart2Min_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va);
190 void DisplayUart2Ansi_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va);
191 
194 
195 int DisplayUart2Min_control(Display_Handle handle, unsigned int cmd, void *arg);
196 int DisplayUart2Ansi_control(Display_Handle handle, unsigned int cmd, void *arg);
197 
198 unsigned int DisplayUart2Min_getType(void);
199 unsigned int DisplayUart2Ansi_getType(void);
200 
201 #endif /* ti_display_DisplayUart2__include */
UART2 Global configuration.
Definition: UART2.h:719
void DisplayUart2Ansi_close(Display_Handle handle)
const Display_FxnTable DisplayUart2Ansi_fxnTable
ADC_Params params
Definition: Driver_Init.h:11
void DisplayUart2Min_close(Display_Handle handle)
int DisplayUart2Ansi_control(Display_Handle handle, unsigned int cmd, void *arg)
PRELIMINARY UART driver interface
unsigned int uartIdx
Definition: DisplayUart2.h:154
void DisplayUart2Ansi_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va)
SemaphoreP_Handle mutex
Definition: DisplayUart2.h:173
Display Parameters.
Definition: Display.h:485
void DisplayUart2Min_clear(Display_Handle handle)
void DisplayUart2Min_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va)
Display_Handle DisplayUart2Ansi_open(Display_Handle handle, Display_Params *params)
char * strBuf
Definition: DisplayUart2.h:160
DisplayUart2 Object.
Definition: DisplayUart2.h:170
Generic interface for text output.
struct DisplayUart2_Object * DisplayUart2_Handle
void DisplayUart2Ansi_init(Display_Handle handle)
void DisplayUart2Min_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine)
The definition of a Display function table that contains the required set of functions to control a s...
Definition: Display.h:535
const Display_FxnTable DisplayUart2Min_fxnTable
void DisplayUart2Ansi_clear(Display_Handle handle)
uint16_t strBufLen
Definition: DisplayUart2.h:162
char * lineClearSeq
Definition: DisplayUart2.h:174
unsigned int baudRate
Definition: DisplayUart2.h:156
void DisplayUart2Ansi_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine)
void DisplayUart2Min_init(Display_Handle handle)
UART2_Handle hUart
Definition: DisplayUart2.h:172
Display_Handle DisplayUart2Min_open(Display_Handle handle, Display_Params *params)
Display Global configuration.
Definition: Display.h:558
unsigned int mutexTimeout
Definition: DisplayUart2.h:158
DisplayUart2 Attributes.
Definition: DisplayUart2.h:151
unsigned int DisplayUart2Ansi_getType(void)
unsigned int DisplayUart2Min_getType(void)
int DisplayUart2Min_control(Display_Handle handle, unsigned int cmd, void *arg)
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale