DisplayUart2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2020, 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 {
153  unsigned int uartIdx;
155  unsigned int baudRate;
157  unsigned int mutexTimeout;
159  char *strBuf;
161  uint16_t strBufLen;
163 
164 
170 typedef struct {
172  SemaphoreP_Handle mutex;
175 
176 
179 
182 
185 
187  uint8_t fromLine,
188  uint8_t toLine);
190  uint8_t fromLine,
191  uint8_t toLine);
192 
193 void DisplayUart2Min_vprintf(Display_Handle handle, uint8_t line,
194  uint8_t column, const char *fmt, va_list va);
195 void DisplayUart2Ansi_vprintf(Display_Handle handle, uint8_t line,
196  uint8_t column, const char *fmt, va_list va);
197 
200 
201 int DisplayUart2Min_control(Display_Handle handle, unsigned int cmd, void *arg);
202 int DisplayUart2Ansi_control(Display_Handle handle, unsigned int cmd, void *arg);
203 
204 unsigned int DisplayUart2Min_getType(void);
205 unsigned int DisplayUart2Ansi_getType(void);
206 
207 #endif /* ti_display_DisplayUart2__include */
UART2 Global configuration.
Definition: UART2.h:697
const Display_FxnTable DisplayUart2Ansi_fxnTable
ADC_Params params
Definition: Driver_Init.h:11
int DisplayUart2Ansi_control(Display_Handle handle, unsigned int cmd, void *arg)
void DisplayUart2Min_close(Display_Handle)
PRELIMINARY UART driver interface
unsigned int uartIdx
Definition: DisplayUart2.h:153
void DisplayUart2Ansi_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va)
SemaphoreP_Handle mutex
Definition: DisplayUart2.h:172
Display Parameters.
Definition: Display.h:498
void DisplayUart2Min_clear(Display_Handle handle)
void DisplayUart2Min_vprintf(Display_Handle handle, uint8_t line, uint8_t column, const char *fmt, va_list va)
char * strBuf
Definition: DisplayUart2.h:159
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:557
const Display_FxnTable DisplayUart2Min_fxnTable
void DisplayUart2Ansi_clear(Display_Handle handle)
uint16_t strBufLen
Definition: DisplayUart2.h:161
Display_Handle DisplayUart2Min_open(Display_Handle, Display_Params *params)
char * lineClearSeq
Definition: DisplayUart2.h:173
unsigned int baudRate
Definition: DisplayUart2.h:155
void DisplayUart2Ansi_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine)
void DisplayUart2Min_init(Display_Handle handle)
UART2_Handle hUart
Definition: DisplayUart2.h:171
Display Global configuration.
Definition: Display.h:580
unsigned int mutexTimeout
Definition: DisplayUart2.h:157
DisplayUart2 Attributes.
Definition: DisplayUart2.h:151
unsigned int DisplayUart2Ansi_getType(void)
void DisplayUart2Ansi_close(Display_Handle)
Display_Handle DisplayUart2Ansi_open(Display_Handle, Display_Params *params)
unsigned int DisplayUart2Min_getType(void)
int DisplayUart2Min_control(Display_Handle handle, unsigned int cmd, void *arg)
© Copyright 1995-2021, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale