ESOS32
ESOSOn32-bitProcessors
esos_hwxxx_rs232.h
Go to the documentation of this file.
1 /*
2  * "Copyright (c) 2019 J. W. Bruce ("AUTHOR(S)")"
3  * All rights reserved.
4  * (J. W. Bruce, jwbruce_AT_tntech.edu, Tennessee Tech University)
5  *
6  * Permission to use, copy, modify, and distribute this software and its
7  * documentation for any purpose, without fee, and without written agreement is
8  * hereby granted, provided that the above copyright notice, the following
9  * two paragraphs and the authors appear in all copies of this software.
10  *
11  * IN NO EVENT SHALL THE "AUTHORS" BE LIABLE TO ANY PARTY FOR
12  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
13  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE "AUTHORS"
14  * HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15  *
16  * THE "AUTHORS" SPECIFICALLY DISCLAIMS ANY WARRANTIES,
17  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
18  * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
19  * ON AN "AS IS" BASIS, AND THE "AUTHORS" HAS NO OBLIGATION TO
20  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
21  *
22  * Please maintain this header in its entirety when copying/modifying
23  * these files.
24  *
25  *
26  */
27 
34 #ifndef _ESOS_HWXXX_RS232_H
35 #define _ESOS_HWXXX_RS232_H
36 
37 /* I N C L U D E S **********************************************************/
38 #include "esos.h"
39 #include "esos_comm.h"
40 #include "esos_hwxxx.h"
41 
42 /* D E F I N I T I O N S ****************************************************/
43 
44 /* E X T E R N S ************************************************************/
45 
46 /* M A C R O S **************************************************************/
47 
48 /* P U B L I C P R O T O T Y P E S *****************************************/
49 void __esos_hw_signal_start_tx(void);
50 void __esos_hw_signal_stop_tx(void);
51 
52 // Documentation for this file. If the \file tag isn't present,
53 // this file won't be documented.
59 /* ########################################################################### */
64 #define IS_CHAR_READY_UART1() U1STAbits.URXDA
65 
70 #define IS_TRANSMIT_BUFFER_FULL_UART1() U1STAbits.UTXBF
71 
77 #define IS_TRANSMIT_COMPLETE_UART1() U1STAbits.TRMT
78 
79 // communications commands used outside of ESOS tasks (like user_init routine)
80 // these routines/macros should almost never be used.
81 void __esos_hw_PutUint8(uint8_t u8_c);
82 void __esos_hw_PutString(uint8_t* psz_in);
83 uint8_t __esos_hw_GetUint8(void);
84 
85 void __esos_configUART1(uint32_t u32_baudRate);
86 void __esos_hw_InitCommSystem(void);
87 
88 
90 inline static void WAIT_UNTIL_TRANSMIT_COMPLETE_UART1() {
92  doHeartbeat();
93 }
94 
95 
96 
97 #endif // end ESOS_HWXXX_RS232_H
IS_TRANSMIT_COMPLETE_UART1
#define IS_TRANSMIT_COMPLETE_UART1()
Definition: esos_hwxxx_rs232.h:77
esos_hwxxx.h
This is the master include file template for the target hardware (hwxxxx)
esos.h
esos_comm.h
__esos_configUART1
void __esos_configUART1(uint32_t u32_baudRate)
Definition: esos_stm32l4_rs232.c:145