MAXREFDES62# Code Documentation  V01.00
RS-485 Micro PLC
 All Files Functions Variables Macros Pages
menu.c
Go to the documentation of this file.
1 
30 /*
31 * Copyright (C) 2012 Maxim Integrated Products, Inc., All Rights Reserved.
32 *
33 * Permission is hereby granted, free of charge, to any person obtaining a
34 * copy of this software and associated documentation files (the "Software"),
35 * to deal in the Software without restriction, including without limitation
36 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
37 * and/or sell copies of the Software, and to permit persons to whom the
38 * Software is furnished to do so, subject to the following conditions:
39 *
40 * The above copyright notice and this permission notice shall be included
41 * in all copies or substantial portions of the Software.
42 *
43 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
44 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46 * IN NO EVENT SHALL MAXIM INTEGRATED PRODUCTS BE LIABLE FOR ANY CLAIM, DAMAGES
47 * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
48 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
49 * OTHER DEALINGS IN THE SOFTWARE.
50 *
51 * Except as contained in this notice, the name of Maxim Integrated Products
52 * shall not be used except as stated in the Maxim Integrated Products
53 * Branding Policy.
54 *
55 * The mere transfer of this software does not imply any licenses
56 * of trade secrets, proprietary technology, copyrights, patents,
57 * trademarks, maskwork rights, or any other form of intellectual
58 * property whatsoever. Maxim Integrated Products retains all ownership rights.
59 *
60 ***************************************************************************/
61 
62 #include "stdio.h"
63 #include "menu.h"
64 
73 {
74  // The following code will cause a clear screen event on Hyperterminal and many other terminal emulators
75  printf("\033[2J");
76 }
77 
78 
87 {
88  printf( "\r\n");
89  printf( "///////////////////////////////////////////////////////////////////\r\n");
90  printf( "// _____ _____ //\r\n");
91  printf( "// / __ \\ / __ \\ //\r\n");
92  printf( "// | | \\/ / / | | //\r\n");
93  printf( "// | | / / | | //\r\n");
94  printf( "// | | / \\ | | //\r\n");
95  printf( "// | | / /\\ \\ | | //\r\n");
96  printf( "// |_| /_/ \\_\\ |_| //\r\n");
97  printf( "// //\r\n");
98  printf( "///////////////////////////////////////////////////////////////////\r\n");
99  printf("\r\n");
100 }
101 
102 
111 {
112  printf( "\r\n");
113  printf( "///////////////////////////////////////////////////////////////////\r\n");
114  printf( "// ### ### //\r\n");
115  printf( "// ## ## //\r\n");
116  printf( "// //\r\n");
117  printf( "// ## _____ _____ ## //\r\n");
118  printf( "// / __ \\ / __ \\ //\r\n");
119  printf( "// ## | | \\/ / / | | ## //\r\n");
120  printf( "// | | / / | | //\r\n");
121  printf( "// | | / \\ | | //\r\n");
122  printf( "// ## | | / /\\ \\ | | ## //\r\n");
123  printf( "// |_| /_/ \\_\\ |_| //\r\n");
124  printf( "// ## ## //\r\n");
125  printf( "// //\r\n");
126  printf( "// ## ## //\r\n");
127  printf( "// ### ### //\r\n");
128  printf( "// //\r\n");
129  printf( "// M A X I M I N T E G R A T E D //\r\n");
130  printf( "// //\r\n");
131  printf( "///////////////////////////////////////////////////////////////////\r\n");
132 
133  printf("\r\n\r\n");
134 }
135 
136 
145 {
146  printf("\r\n>> ");
147  fflush(stdout);
148 }
149 
150 
159 {
160  printf("----------------------------------------------------\r\n\r\n");
161 }
162 
170 {
172 
173  printf("Press a number to select mode:\r\n");
174 
175  printf("{0} Keypress Loopback Test\n\r"\
176  "{1} Send Text File Loopback Test - Tera Term Required\n\r");
177 
179 }
180 
188 {
189  maxim_menu_cls();
190  printf("Connect the A terminal on the P300 terminal block to the\r\n");
191  printf("A terminal on the P301 terminal block with a wire.\r\n");
192  printf("Connect the B terminal on the P300 terminal block to the\r\n");
193  printf("B terminal on the P301 terminal block with a wire.\r\n");
194  printf("Any character entered will be transferred from the MAX14783 to\r\n");
195  printf("the MAX14789.\r\n");
196  printf("Each outgoing character will be compared with the incoming\r\n");
197  printf("character for verification.\r\n");
198  printf("(Press ESC key to return to the main menu)\r\n");
199 }
200 
208 {
209  maxim_menu_cls();
210  printf("Connect the A terminal on the P300 terminal block to the\r\n");
211  printf("A terminal on the P301 terminal block with a wire.\r\n");
212  printf("Connect the B terminal on the P300 terminal block to the\r\n");
213  printf("B terminal on the P301 terminal block with a wire.\r\n");
214  printf("All data will be transferred from the MAX14783 to\r\n");
215  printf("the MAX14789.\r\n");
216  printf("Each outgoing character will be compared with the incoming\r\n");
217  printf("character for verification.\r\n");
218  printf("Tera Term is required for this operation.\r\n");
219  printf("Select \"Terminal..\" in the \"Setup\" menu, and select\r\n");
220  printf("\"AUTO\" for the \"Receive:\" option.\r\n");
221  printf("Use the \"Send File...\" function in the \"File\" menu to\r\n");
222  printf("transmit a TEXT file\r\n");
223 
224 }