text: // UART2.c
  // Runs on MSP432
  // Busy-wait device driver for the UART UCA2.
  // Daniel Valvano
  // July 11, 2019
  // Modified by EE345L students Charlie Gough && Matt Hawk
  // Modified by EE345M students Agustinus Darmawan && Mingjie Qiu
  
  // Modified by Stan Baek at US Air Force Academy
  
  /* This example accompanies the book
     "Embedded Systems: Introduction to Robotics,
     Jonathan W. Valvano, ISBN: 9781074544300, copyright (c) 2019
   For more information about my classes, my research, and my books, see
   http://users.ece.utexas.edu/~valvano/
  
  Simplified BSD License (FreeBSD License)
  Copyright (c) 2019, Jonathan Valvano, All rights reserved.
  
  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:
  
  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice,
     this list of conditions and the following disclaimer in the documentation
     and/or other materials provided with the distribution.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
  USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  
  The views and conclusions contained in the software and documentation are
  those of the authors and should not be interpreted as representing official
  policies, either expressed or implied, of the FreeBSD Project.
  */
  
  // UCA2RXD (VCP receive) connected to P3.2
  // UCA2TXD (VCP transmit) connected to P3.3
  
  #include <stdint.h>
  #include <stdio.h>
  #include "UART2.h"
  #include "msp.h"
  
  
  //------------UART2_Init------------
  // Initialize the UART for the given baud rate (assuming 12 MHz SMCLK clock),
  // 8 bit word length, no parity bits, one stop bit
  // Input: none
  // Output: none
  void UART2_Init(uint16_t baudrate){
  
      EUSCI_A2->CTLW0 = 0x0001; // hold the USCI module in reset mode
  
      // you write this as part of Lab 11
  
  
  }
  
  
  //------------UART2_InChar------------
  // Wait for new serial port input
  // Input: none
  // Output: ASCII code for key typed
  char UART2_InChar(void){
      // you write this as part of Lab 11
  
  
  
  }
  
  
  //------------UART2_OutChar------------
  // Output 8-bit to serial port
  // Input: letter is an 8-bit ASCII character to be transferred
  // Output: none
  void UART2_OutChar(char letter){
      // you write this as part of Lab 11
  
  
  }
  
  
  //------------UART2_OutString------------
  // Output String (NULL termination)
  // Input: pointer to a NULL-terminated string to be transferred
  // Output: none
  void UART2_OutString(char *pt){
      // you write this as part of Lab 11
  
      // While there is data (*ptr)
  
      // Send data casting as unsigned char.
  
      // Increment pointer
  
  
  }
  
  