SimpleLink MCU SDK Driver APIs  tidrivers_msp43x_3_01_01_03
DisplayUart.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016, 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_DisplayUart__include
129 #define ti_display_DisplayUart__include
130 
131 #include <ti/drivers/dpl/SemaphoreP.h>
132 #include <ti/drivers/UART.h>
133 #include <ti/display/Display.h>
134 #include <stdint.h>
135 
136 /* Ensure backwards compatibility. Old examples will use Minimal. */
137 #ifndef DisplayUart_fxnTable
138 # define DisplayUart_fxnTable DisplayUartMin_fxnTable
139 #endif
140 
141 /* Line number that means 'put in scrolling section', if exists */
142 #define DisplayUart_SCROLLING 0xFF
143 
146 
147 typedef struct DisplayUart_HWAttrs
148 {
149  unsigned int uartIdx;
150  unsigned int baudRate;
151  unsigned int mutexTimeout;
152  char *strBuf;
153  uint16_t strBufLen;
155 
156 
157 typedef struct DisplayUart_Object
158 {
160  SemaphoreP_Handle mutex;
163 
164 
167 
170 
173 
175  uint8_t fromLine,
176  uint8_t toLine);
178  uint8_t fromLine,
179  uint8_t toLine);
180 
181 void DisplayUartMin_vprintf(Display_Handle handle, uint8_t line,
182  uint8_t column, char *fmt, va_list va);
183 void DisplayUartAnsi_vprintf(Display_Handle handle, uint8_t line,
184  uint8_t column, char *fmt, va_list va);
185 
188 
189 int DisplayUartMin_control(Display_Handle handle, unsigned int cmd, void *arg);
190 int DisplayUartAnsi_control(Display_Handle handle, unsigned int cmd, void *arg);
191 
192 unsigned int DisplayUartMin_getType(void);
193 unsigned int DisplayUartAnsi_getType(void);
194 
195 #endif /* ti_display_DisplayUart__include */
const Display_FxnTable DisplayUartMin_fxnTable
SemaphoreP_Handle mutex
Definition: DisplayUart.h:160
unsigned int DisplayUartMin_getType(void)
void DisplayUartMin_clear(Display_Handle handle)
char * lineClearSeq
Definition: DisplayUart.h:161
const Display_FxnTable DisplayUartAnsi_fxnTable
void DisplayUartAnsi_vprintf(Display_Handle handle, uint8_t line, uint8_t column, char *fmt, va_list va)
void DisplayUartAnsi_clear(Display_Handle handle)
unsigned int mutexTimeout
Definition: DisplayUart.h:151
Display Parameters.
Definition: Display.h:442
UART Global configuration.
Definition: UART.h:691
Definition: DisplayUart.h:157
void DisplayUartAnsi_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine)
struct DisplayUart_Object * DisplayUart_Handle
Generic interface for text output.
void DisplayUartMin_clearLines(Display_Handle handle, uint8_t fromLine, uint8_t toLine)
unsigned int uartIdx
Definition: DisplayUart.h:149
void DisplayUartAnsi_init(Display_Handle handle)
char * strBuf
Definition: DisplayUart.h:152
UART driver interface.
Definition: DisplayUart.h:147
unsigned int DisplayUartAnsi_getType(void)
uint16_t strBufLen
Definition: DisplayUart.h:153
UART_Handle hUart
Definition: DisplayUart.h:159
void DisplayUartMin_vprintf(Display_Handle handle, uint8_t line, uint8_t column, char *fmt, va_list va)
unsigned int baudRate
Definition: DisplayUart.h:150
The definition of a Display function table that contains the required set of functions to control a s...
Definition: Display.h:501
int DisplayUartAnsi_control(Display_Handle handle, unsigned int cmd, void *arg)
void DisplayUartMin_init(Display_Handle handle)
void DisplayUartMin_close(Display_Handle)
Display_Handle DisplayUartAnsi_open(Display_Handle, Display_Params *params)
int DisplayUartMin_control(Display_Handle handle, unsigned int cmd, void *arg)
Display_Handle DisplayUartMin_open(Display_Handle, Display_Params *params)
Display Global configuration.
Definition: Display.h:524
struct DisplayUart_HWAttrs DisplayUart_HWAttrs
void DisplayUartAnsi_close(Display_Handle)
struct DisplayUart_Object DisplayUart_Object
Copyright 2016, Texas Instruments Incorporated