Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Committer:
sahilmgandhi
Date:
Sun May 14 23:18:57 2017 +0000
Revision:
18:6a4db94011d3
Publishing again

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sahilmgandhi 18:6a4db94011d3 1 /**
sahilmgandhi 18:6a4db94011d3 2 ******************************************************************************
sahilmgandhi 18:6a4db94011d3 3 * @file uart.h
sahilmgandhi 18:6a4db94011d3 4 * @brief Defines common properties of any UART driver.
sahilmgandhi 18:6a4db94011d3 5 * @internal
sahilmgandhi 18:6a4db94011d3 6 * @author ON Semiconductor
sahilmgandhi 18:6a4db94011d3 7 * $Rev: 2074 $
sahilmgandhi 18:6a4db94011d3 8 * $Date: 2013-07-10 18:06:15 +0530 (Wed, 10 Jul 2013) $
sahilmgandhi 18:6a4db94011d3 9 ******************************************************************************
sahilmgandhi 18:6a4db94011d3 10 * Copyright 2016 Semiconductor Components Industries LLC (d/b/a “ON Semiconductor”).
sahilmgandhi 18:6a4db94011d3 11 * All rights reserved. This software and/or documentation is licensed by ON Semiconductor
sahilmgandhi 18:6a4db94011d3 12 * under limited terms and conditions. The terms and conditions pertaining to the software
sahilmgandhi 18:6a4db94011d3 13 * and/or documentation are available at http://www.onsemi.com/site/pdf/ONSEMI_T&C.pdf
sahilmgandhi 18:6a4db94011d3 14 * (“ON Semiconductor Standard Terms and Conditions of Sale, Section 8 Software”) and
sahilmgandhi 18:6a4db94011d3 15 * if applicable the software license agreement. Do not use this software and/or
sahilmgandhi 18:6a4db94011d3 16 * documentation unless you have carefully read and you agree to the limited terms and
sahilmgandhi 18:6a4db94011d3 17 * conditions. By using this software and/or documentation, you agree to the limited
sahilmgandhi 18:6a4db94011d3 18 * terms and conditions.
sahilmgandhi 18:6a4db94011d3 19 *
sahilmgandhi 18:6a4db94011d3 20 * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
sahilmgandhi 18:6a4db94011d3 21 * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
sahilmgandhi 18:6a4db94011d3 22 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
sahilmgandhi 18:6a4db94011d3 23 * ON SEMICONDUCTOR SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL,
sahilmgandhi 18:6a4db94011d3 24 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
sahilmgandhi 18:6a4db94011d3 25 * @endinternal
sahilmgandhi 18:6a4db94011d3 26 *
sahilmgandhi 18:6a4db94011d3 27 * @details
sahilmgandhi 18:6a4db94011d3 28 * A UART driver must comply to the generic driver template (see driver.h), and
sahilmgandhi 18:6a4db94011d3 29 * more specifically to the character driver template (see char_driver.h). All
sahilmgandhi 18:6a4db94011d3 30 * UART drivers share some properties; defining these is the purpose of this file.
sahilmgandhi 18:6a4db94011d3 31 *
sahilmgandhi 18:6a4db94011d3 32 * The options passed when opening a UART device should at least include the
sahilmgandhi 18:6a4db94011d3 33 * flow control type and the baud rate. These are included in the uart_options_t
sahilmgandhi 18:6a4db94011d3 34 * data type. The type can be extended by a UART driver implementation.
sahilmgandhi 18:6a4db94011d3 35 *
sahilmgandhi 18:6a4db94011d3 36 * The UART driver implementation must make its driver publicly available with
sahilmgandhi 18:6a4db94011d3 37 * an external global variable.
sahilmgandhi 18:6a4db94011d3 38 *
sahilmgandhi 18:6a4db94011d3 39 * @ingroup uart
sahilmgandhi 18:6a4db94011d3 40 */
sahilmgandhi 18:6a4db94011d3 41
sahilmgandhi 18:6a4db94011d3 42 #ifndef UART_H_
sahilmgandhi 18:6a4db94011d3 43 #define UART_H_
sahilmgandhi 18:6a4db94011d3 44
sahilmgandhi 18:6a4db94011d3 45 //#include "char_driver.h"
sahilmgandhi 18:6a4db94011d3 46
sahilmgandhi 18:6a4db94011d3 47 /** Type listing the supported kinds of flow control. */
sahilmgandhi 18:6a4db94011d3 48 typedef enum {
sahilmgandhi 18:6a4db94011d3 49 /** No flow control */
sahilmgandhi 18:6a4db94011d3 50 none,
sahilmgandhi 18:6a4db94011d3 51 /** use hardware CTS (External CPU indicates it is ok for the modem to transmit)
sahilmgandhi 18:6a4db94011d3 52 * and RTS (modem requests to sent to external CPU) flow control.
sahilmgandhi 18:6a4db94011d3 53 */
sahilmgandhi 18:6a4db94011d3 54 rtscts,
sahilmgandhi 18:6a4db94011d3 55 /** use hardware CTS/RTS flow control, but CTS is no response to RTS,
sahilmgandhi 18:6a4db94011d3 56 * RTS and CTS are used to indicate intent to transmit.
sahilmgandhi 18:6a4db94011d3 57 */
sahilmgandhi 18:6a4db94011d3 58 rtscts_e
sahilmgandhi 18:6a4db94011d3 59 } flow_control_t;
sahilmgandhi 18:6a4db94011d3 60
sahilmgandhi 18:6a4db94011d3 61 /** A set of options to be passed when creating a uart device instance. */
sahilmgandhi 18:6a4db94011d3 62 typedef struct uart_options {
sahilmgandhi 18:6a4db94011d3 63 uint32_t baudrate; /**< The expected baud rate. */
sahilmgandhi 18:6a4db94011d3 64 flow_control_t control;/**< Defines type of flow control, none or rtscts */
sahilmgandhi 18:6a4db94011d3 65 } uart_options_t, *uart_options_pt;
sahilmgandhi 18:6a4db94011d3 66
sahilmgandhi 18:6a4db94011d3 67 #endif /* UART_H_ */