UART2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2023, 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  */
32 /*!*****************************************************************************
33  * @file UART2.h
34  * @brief <b>PRELIMINARY</b> UART driver interface
35  *
36  * <b>WARNING</b> These APIs are <b>PRELIMINARY</b>, and subject to
37  * change in the next few months.
38  *
39  * The UART2 driver is an updated version of the UART driver. The name
40  * UART2 was given due to changes in the API, to support backwards
41  * compatibility with applications using the existing UART driver.
42  * Key differences between the UART and UART2 drivers:
43  * - UART2 has both RX and TX ring buffers for receiving/sending data.
44  * - UART2 uses DMA to transfer data between the UART FIFOs and the
45  * RX and TX ring buffers (in nonblocking mode). In blocking mode and
46  * callback mode, DMA will transfer data straight between the hardware
47  * FIFO and the source/destination buffer supplied by the application.
48  * NOTE: If the source-buffer for a TX operation resides in flash,
49  * the driver will constrain the flash to remain on during idle.
50  * - The UART2 APIs for reading and writing data have been made more
51  * posix-like.
52  * - UART2 provides for event notification, allowing the application
53  * to receive TX start and completion events, and RX error events.
54  * @note These events are synchronous to what can be observed on the data
55  * lines. A UART2_EVENT_TX_FINISHED event will for example only occur
56  * after all data has been shifted from the hardware FIFO out onto the
57  * TX-pin. In contrast, read and write-callbacks are invoked when the
58  * driver has finished writing data into the hardware FIFO.
59  *
60  * To use the UART2 driver, ensure that the correct driver library for your
61  * device is linked in and include this header file as follows:
62  * @code
63  * #include <ti/drivers/UART2.h>
64  * @endcode
65  *
66  * This module serves as the main interface for applications. Its purpose
67  * is to implement common code between the device specific implementations
68  * of UART2. Any device specific code that differs from the common code is
69  * called through functions prefaced with the "UART2_" naming convention.
70  * These functions are implemented in each device specific implementation.
71  *
72  * @anchor ti_drivers_UART2_Overview
73  * # Overview
74  * A UART is used to translate data between the chip and a serial port.
75  * The UART2 driver simplifies reading and writing to any of the UART
76  * peripherals on the board, with multiple modes of operation and performance.
77  * These include blocking and nonblocking modes.
78  *
79  * The UART2 driver interface provides device independent APIs, data types,
80  * and macros. The APIs in this driver serve as an interface to a typical RTOS
81  * application. The specific peripheral implementations are responsible for
82  * creating all the RTOS specific primitives to allow for thread-safe
83  * operation.
84  *
85  * <hr>
86  * @anchor ti_drivers_UART2_Usage
87  * # Usage
88  *
89  * This documentation provides a basic @ref ti_drivers_UART2_Synopsis
90  * "usage summary" and a set of @ref ti_drivers_UART2_Examples "examples"
91  * in the form of commented code fragments. Detailed descriptions of the
92  * APIs are provided in subsequent sections.
93  *
94  * @anchor ti_drivers_UART2_Synopsis
95  * ## Synopsis
96  * @anchor ti_drivers_UART2_Synopsis_Code
97  * @code
98  * // Import the UART2 driver definitions
99  * #include <ti/drivers/UART2.h>
100  *
101  * // Initialize UART2 parameters
102  * UART2_Params params;
103  * UART2_Params_init(&params);
104  * params.baudRate = 9600;
105  * params.readMode = UART2_Mode_BLOCKING;
106  * params.writeMode = UART2_Mode_BLOCKING;
107  *
108  * // Open the UART
109  * UART2_Handle uart;
110  * uart = UART2_open(CONFIG_UART0, &params);
111  *
112  * // Enable receiver, inhibit low power mode
113  * UART2_rxEnable(uart);
114  *
115  * // Read from the UART.
116  * size_t bytesRead;
117  * uint8_t buffer[BUFSIZE];
118  * int32_t status;
119  * status = UART2_read(uart, buffer, BUFSIZE, &bytesRead);
120  *
121  * // Write to the UART
122  * size_t bytesWritten;
123  * status = UART2_write(uart, buffer, BUFSIZE, &bytesWritten);
124  *
125  * // Close the UART
126  * UART2_close(uart);
127  * @endcode
128  *
129  * <hr>
130  * @anchor ti_drivers_UART2_Examples
131  * # Examples
132  * The following code example opens a UART instance, reads
133  * a byte from the UART, and then writes the byte back to the UART.
134  *
135  * @code
136  * char input;
137  * UART2_Handle uart;
138  * UART2_Params uartParams;
139  *
140  * // Open an instance of the UART2 driver
141  * UART2_Params_init(&uartParams);
142  * uartParams.baudRate = 115200;
143  * uart = UART2_open(CONFIG_UART0, &uartParams);
144  *
145  * if (uart == NULL) {
146  * // UART2_open() failed
147  * while (1);
148  * }
149  *
150  * // Enable receiver, inhibit low power mode
151  * UART2_rxEnable(uart);
152  *
153  * // Loop forever echoing
154  * while (1) {
155  * status = UART2_read(uart, &input, 1, &bytesRead);
156  * status = UART2_write(uart, &input, 1, &bytesWritten);
157  * }
158  * @endcode
159  *
160  * Details for the example code above are described in the following
161  * subsections.
162  *
163  * ### Opening the UART2 Driver #
164  *
165  * Opening a UART requires four steps:
166  * 1. Create and initialize a UART2_Params structure.
167  * 2. Fill in the desired parameters.
168  * 3. Call UART2_open(), passing the index of the UART in the UART2_config
169  * structure, and the address of the UART2_Params structure. The
170  * UART2 instance is specified by the index in the UART2_config structure.
171  * 4. Check that the UART2 handle returned by UART2_open() is non-NULL,
172  * and save it. The handle will be used to read and write to the
173  * UART you just opened.
174  *
175  * Only one UART index can be used at a time; calling UART2_open() a second
176  * time with the same index previosly passed to UART2_open() will result in
177  * an error. You can, though, re-use the index if the instance is closed
178  * via UART2_close().
179  * In the previous example code, CONFIG_UART0 is passed to UART2_open().
180  * This macro is defined in the example's ti_drivers_config.h file.
181  *
182  *
183  * ### Modes of Operation #
184  *
185  * The UART driver can operate in blocking, nonblocking, or callback mode, by
186  * setting the writeMode and readMode parameters passed to UART2_open().
187  * If these parameters are not set, as in the example code, the UART2
188  * driver defaults to blocking mode. Options for the writeMode and
189  * readMode parameters are #UART2_Mode_BLOCKING, #UART2_Mode_NONBLOCKING, and
190  * #UART2_Mode_CALLBACK:
191  *
192  * - #UART2_Mode_BLOCKING uses a semaphore to block while data is being sent,
193  * or while waiting for some data to be received. The context of calling
194  * UART2_read() and UART2_write() in blocking mode must always be a Task.
195  * The UART2_write() call will block until all data has been transmitted
196  * onto the TX pin. The UART2_read() calls can be configured to
197  * have two different behaviors, using the #UART2_ReadReturnMode of the
198  * #UART2_Params. In #UART2_ReadReturnMode_FULL (the default),
199  * UART2_read() will block until the requested number of bytes has been
200  * received. In #UART2_ReadReturnMode_PARTIAL, UART2_read() will block
201  * until either the requested number of bytes has been received,
202  * or a UART hardware read timeout has occurred. Using
203  * UART2_ReadReturnMode_PARTIAL is a good choice if the number of
204  * incoming data bytes is unknown. In UART2_Mode_BLOCKING,
205  * UART2_read() will always return at least some data.
206  * UART2_readTimeout() can be used to specify a timeout in system
207  * clock ticks, to wait for data.
208  * UART2_readTimeout() will return when all data is received, or
209  * the specified timeout expires, or, if using the mode
210  * UART2_ReadReturnMode_PARTIAL, a hardware read timeout occurs,
211  * whichever happens first.
212  *
213  * - #UART2_Mode_NONBLOCKING does not block waiting for data to be sent
214  * or received. UART2_write() and UART2_read() will return immediately
215  * having transferred as much data as the driver can immediately accept
216  * or has available, respectively. If no data can be accepted or
217  * received, UART2_write() and UART2_read() return UART2_STATUS_EAGAIN.
218  *
219  * - #UART2_Mode_CALLBACK is nonblocking and UART2_read() and UART2_write()
220  * will return while data is being sent in the context of a hardware
221  * interrupt. When all data has been read from, or written to the hardware
222  * FIFO, the UART2 driver will call the user's callback function, and the
223  * driver is ready to accept another read or write operation.
224  * @note When transmitting, it is therefore not guaranteed that all data has
225  * been shifted out to the TX pin when the write-callback is invoked. This is
226  * instead signalled by the UART2_EVENT_TX_FINISHED event.
227  * In some cases, the UART data transfer may have been cancelled,
228  * so the number of bytes sent/received are passed to the callback function.
229  * Your implementation of the callback function can use this information as needed.
230  * Since the user's callback may be called in the context of a hardware
231  * interrupt, the callback function must not make any RTOS blocking calls.
232  * The buffer passed to UART2_write() in UART2_Mode_CALLBACK must remain
233  * coherent until all the characters have been sent
234  * (ie until the tx callback has been called with a byte count equal to
235  * that passed to UART2_write()).
236  *
237  * ### Enabling the Receiver #
238  *
239  * The example code enables the collection of data into the RX ring buffer
240  * \a before the first call to UART2_read():
241  *
242  * @code
243  * UART2_rxEnable(uart);
244  * @endcode
245  *
246  * Note that this call is not necessary if the first UART2_read() is called
247  * in time to prevent the RX FIFO from overrun, or if flow control is used.
248  *
249  * ### Reading and Writing Data #
250  *
251  * The example code reads one byte frome the UART instance, and then writes
252  * one byte back to the same instance:
253  *
254  * @code
255  * status = UART2_read(uart, &input, 1, &bytesRead);
256  * status = UART2_write(uart, &input, 1, &bytesWritten);
257  * @endcode
258  *
259  * The UART2 driver allows full duplex data transfers. Therefore, it is
260  * possible to call UART2_read() and UART2_write() at the same time.
261  * It is not possible, however,
262  * to issue multiple concurrent operations in the same direction.
263  * For example, if one thread calls UART2_read(uart0, buffer0...),
264  * any other thread attempting UART2_read(uart0, buffer1...) will result in
265  * an error of UART2_STATUS_EINUSE, until all the data from the first
266  * UART2_read() has been transferred to buffer0. This applies to blocking,
267  * callback, and nonblocking modes. So applications must either synchronize
268  * UART2_read() (or UART2_write()) calls that use the same UART handle, or
269  * check for the UART2_STATUS_EINUSE return code indicating that a transfer is
270  * still ongoing.
271  *
272  * <hr>
273  * @anchor ti_drivers_UART2_Configuration
274  * # Configuration
275  *
276  * Refer to the @ref driver_configuration "Driver's Configuration" section
277  * for driver configuration information.
278  * <hr>
279  *
280  * ============================================================================
281  */
282 
283 #ifndef ti_drivers_UART2__include
284 #define ti_drivers_UART2__include
285 
286 #include <stddef.h>
287 #include <stdint.h>
288 #include <stdbool.h>
289 
290 #include <ti/drivers/Power.h>
291 
292 #include <ti/drivers/dpl/ClockP.h>
293 #include <ti/drivers/dpl/HwiP.h>
296 
297 #ifdef __cplusplus
298 extern "C" {
299 #endif
300 
304 #define UART2_FLOWCTRL_NONE 0
305 
309 #define UART2_FLOWCTRL_HARDWARE 1
310 
317 #define UART2_STATUS_SUCCESS (0)
318 
322 #define UART2_STATUS_SREADTIMEOUT (1)
323 
327 #define UART2_STATUS_EFRAMING (-1)
328 
332 #define UART2_STATUS_EPARITY (-2)
333 
337 #define UART2_STATUS_EBREAK (-4)
338 
342 #define UART2_STATUS_EOVERRUN (-8)
343 
347 #define UART2_STATUS_EINUSE (-9)
348 
352 #define UART2_STATUS_EINVALID (-10)
353 
357 #define UART2_STATUS_EFAIL (-11)
358 
362 #define UART2_STATUS_EMEMORY (-12)
363 
367 #define UART2_STATUS_ETIMEOUT (-13)
368 
372 #define UART2_STATUS_ECANCELLED (-14)
373 
377 #define UART2_STATUS_ENOTOPEN (-15)
378 
383 #define UART2_STATUS_EAGAIN (-16)
384 
394 #define UART2_EVENT_OVERRUN (0x08)
395 
399 #define UART2_EVENT_BREAK (0x04)
400 
404 #define UART2_EVENT_PARITY (0x02)
405 
409 #define UART2_EVENT_FRAMING (0x01)
410 
416 #define UART2_EVENT_TX_BEGIN (0x10)
417 
423 #define UART2_EVENT_TX_FINISHED (0x20)
424 
430 #define UART2_WAIT_FOREVER (~(0U))
431 
435 typedef struct UART2_Config_ *UART2_Handle;
436 
454 typedef void (*UART2_Callback)(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status);
455 
477 typedef void (*UART2_EventCallback)(UART2_Handle handle, uint32_t event, uint32_t data, void *userArg);
478 
484 typedef enum
485 {
492 
504 
513  /* Added for backwards compatibility. */
514  UART2_Mode_POLLING = UART2_Mode_NONBLOCKING
516 } UART2_Mode;
517 
533 typedef enum
534 {
537 
541 
547 typedef enum
548 {
553 } UART2_DataLen;
554 
560 typedef enum
561 {
565 
571 typedef enum
572 {
578 } UART2_Parity;
579 
588 typedef struct
589 {
590  UART2_Mode readMode;
591  UART2_Mode writeMode;
595  uint32_t eventMask;
596  UART2_ReadReturnMode readReturnMode;
597  uint32_t baudRate;
601  void *userArg;
602 } UART2_Params;
603 
605 #define UART2_BASE_OBJECT \
606  /* UART2 state variable */ \
607  struct \
608  { \
609  uint32_t overrunCount; \
610  UART2_Mode readMode; \
611  UART2_Mode writeMode; \
612  UART2_ReadReturnMode readReturnMode; \
613  bool opened; \
614  bool txEnabled; \
615  bool rxEnabled; \
616  bool rxCancelled; \
617  bool txCancelled; \
618  bool readTimedOut; \
619  bool writeTimedOut; \
620  bool overrunActive; \
621  bool inReadCallback; \
622  bool readCallbackPending; \
623  bool inWriteCallback; \
624  bool writeCallbackPending; \
625  bool readToRingbuf; \
626  } state; \
627  \
628  HwiP_Struct hwi; \
629  uint32_t baudRate; \
630  UART2_DataLen dataLength; \
631  UART2_StopBits stopBits; \
632  UART2_Parity parityType; \
633  int32_t rxStatus; \
634  int32_t txStatus; \
635  UART2_EventCallback eventCallback; \
636  uint32_t eventMask; \
637  void *userArg; \
638  \
639  /* UART read variables */ \
640  RingBuf_Object rxBuffer; \
641  bool readInUse; \
642  unsigned char *readBuf; \
643  size_t readSize; \
644  size_t readCount; \
645  size_t rxSize; \
646  size_t bytesRead; \
647  SemaphoreP_Struct readSem; \
648  UART2_Callback readCallback; \
649  \
650  /* UART write variables */ \
651  RingBuf_Object txBuffer; \
652  volatile bool writeInUse; \
653  const unsigned char *writeBuf; \
654  size_t writeSize; \
655  size_t writeCount; \
656  size_t txSize; \
657  size_t bytesWritten; \
658  SemaphoreP_Struct writeSem; \
659  UART2_Callback writeCallback; \
660  \
661  /* For Power management */ \
662  Power_Resource powerMgrId; \
663 
670 typedef struct
671 {
672  UART2_BASE_OBJECT
673 } UART2_Object;
677 #define UART2_BASE_HWATTRS \
678  \
679  uint32_t baseAddr; \
680  \
681  int intNum; \
682  \
683  uint8_t intPriority; \
684  \
685  unsigned char *rxBufPtr; \
686  \
687  size_t rxBufSize; \
688  \
689  unsigned char *txBufPtr; \
690  \
691  size_t txBufSize; \
692  \
693  uint32_t flowControl; \
694  \
695  uint32_t rxPin; \
696  \
697  uint32_t txPin; \
698  \
699  uint32_t ctsPin; \
700  \
701  uint32_t rtsPin; \
702 
708 typedef struct
709 {
710  UART2_BASE_HWATTRS
711 } UART2_HWAttrs;
721 typedef struct UART2_Config_
722 {
724  void *object;
725 
727  void const *hwAttrs;
728 } UART2_Config;
729 
730 extern const UART2_Config UART2_config[];
731 extern const uint_least8_t UART2_count;
732 
745 extern void UART2_close(UART2_Handle handle);
746 
758 extern void UART2_flushRx(UART2_Handle handle);
759 
772 extern size_t UART2_getRxCount(UART2_Handle handle);
773 
789 extern UART2_Handle UART2_open(uint_least8_t index, UART2_Params *params);
790 
812 
887 extern int_fast16_t UART2_read(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead);
888 
890 extern int_fast16_t __attribute__((weak))
891 UART2_readFull(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead);
979 extern int_fast16_t UART2_readTimeout(UART2_Handle handle,
980  void *buffer,
981  size_t size,
982  size_t *bytesRead,
983  uint32_t timeout);
984 
1006 extern void UART2_readCancel(UART2_Handle handle);
1007 
1069 extern int_fast16_t UART2_write(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten);
1070 
1085 extern void UART2_rxDisable(UART2_Handle handle);
1086 
1101 extern void UART2_rxEnable(UART2_Handle handle);
1102 
1172 extern int_fast16_t UART2_writeTimeout(UART2_Handle handle,
1173  const void *buffer,
1174  size_t size,
1175  size_t *bytesWritten,
1176  uint32_t timeout);
1177 
1198 extern void UART2_writeCancel(UART2_Handle handle);
1199 
1200 #ifdef __cplusplus
1201 }
1202 #endif
1203 
1204 #endif /* ti_drivers_UART2__include */
UART2 Global configuration.
Definition: UART2.h:721
int_fast16_t UART2_readTimeout(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead, uint32_t timeout)
Function that reads data from a UART, with a specified timeout for blocking mode. ...
Definition: UART2.h:549
ADC_Params params
Definition: Driver_Init.h:11
UART2_ReadReturnMode
UART2 return mode settings.
Definition: UART2.h:533
const uint_least8_t UART2_count
void UART2_readCancel(UART2_Handle handle)
Function that cancels a UART2_read() function call.
UART2_ReadReturnMode readReturnMode
Definition: UART2.h:596
Definition: UART2.h:503
size_t UART2_getRxCount(UART2_Handle handle)
Get the number of bytes available in the circular buffer.
UART2_Parity
UART2 parity type settings.
Definition: UART2.h:571
const UART2_Config UART2_config[]
Clock interface for the RTOS Porting Interface.
int_fast16_t UART2_write(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten)
Function that writes data to a UART.
Definition: UART2.h:576
Definition: UART2.h:562
Power Manager.
Definition: UART2.h:574
UART2_Callback readCallback
Definition: UART2.h:592
void * userArg
Definition: UART2.h:601
Definition: UART2.h:550
Definition: UART2.h:536
struct UART2_Config_ * UART2_Handle
A handle that is returned from a UART2_open() call.
Definition: UART2.h:435
Definition: UART2.h:552
void const * hwAttrs
Definition: UART2.h:727
uint32_t eventMask
Definition: UART2.h:595
UART2_StopBits stopBits
Definition: UART2.h:599
void * object
Definition: UART2.h:724
UART2_Mode writeMode
Definition: UART2.h:591
Semaphore module for the RTOS Porting Interface.
void(* UART2_EventCallback)(UART2_Handle handle, uint32_t event, uint32_t data, void *userArg)
The definition of a callback function used by the UART driver. The callback can occur in task or inte...
Definition: UART2.h:477
UART2_Parity parityType
Definition: UART2.h:600
Definition: UART2.h:491
Definition: UART2.h:551
void UART2_flushRx(UART2_Handle handle)
Function to flush data in the UART RX FIFO.
UART2_Mode
UART2 mode settings.
Definition: UART2.h:484
UART2_Handle UART2_open(uint_least8_t index, UART2_Params *params)
Function to initialize a given UART peripheral.
void UART2_close(UART2_Handle handle)
Function to close a UART peripheral specified by the UART2 handle.
void UART2_rxDisable(UART2_Handle handle)
Function that disables collecting of RX data into the circular buffer.
Definition: UART2.h:563
UART2_Callback writeCallback
Definition: UART2.h:593
UART2 Parameters.
Definition: UART2.h:588
struct UART2_Config_ UART2_Config
UART2 Global configuration.
Definition: UART2.h:575
UART2_StopBits
UART2 stop bit settings.
Definition: UART2.h:560
void UART2_Params_init(UART2_Params *params)
Function to initialize the UART2_Params struct to its defaults.
UART2_DataLen dataLength
Definition: UART2.h:598
int_fast16_t UART2_read(UART2_Handle handle, void *buffer, size_t size, size_t *bytesRead)
Function that reads data from a UART.
void UART2_rxEnable(UART2_Handle handle)
Function that enables collecting of RX data into the circular buffer.
UART2_EventCallback eventCallback
Definition: UART2.h:594
int_fast16_t UART2_writeTimeout(UART2_Handle handle, const void *buffer, size_t size, size_t *bytesWritten, uint32_t timeout)
Function that writes data to a UART, with a specified timeout.
Definition: UART2.h:573
Definition: UART2.h:511
Hardware Interrupt module for the RTOS Porting Interface.
Definition: UART2.h:539
void(* UART2_Callback)(UART2_Handle handle, void *buf, size_t count, void *userArg, int_fast16_t status)
The definition of a callback function used by the UART2 driver when used in UART2_Mode_CALLBACK The c...
Definition: UART2.h:454
UART2_Mode readMode
Definition: UART2.h:590
Definition: UART2.h:577
UART2_DataLen
UART2 data length settings.
Definition: UART2.h:547
void UART2_writeCancel(UART2_Handle handle)
Function that cancels a UART2_write() function call.
uint32_t baudRate
Definition: UART2.h:597
© Copyright 1995-2023, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale