Sonoma (MAXREFDES14#) Code Documentation V01.00 Isolated EMP (Energy Measurement Processor)

- Main Page
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Macros Pages
MAXREFDES14.h
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 #ifndef MAXREFDES14_H_
63 #define MAXREFDES14_H_
64
65 #include "xparameters.h" /* EDK generated parameters */
66 #include "stdio.h"
67
68 #include "xgpio.h"
69 #include "xgpio_l.h"
70 #include "utilities.h"
71 #include <string.h>
72 #include <stdio.h>
73 #include "platform.h"
74 #include "math.h"
75
76 #define DEFAULT_HYPERTERMINAL_UART_ID XPAR_PS7_UART_1_DEVICE_ID
77 #define DEFAULT_HYPERTERMINAL_UART_ADDRESS XPAR_PS7_UART_1_BASEADDR
78
79 #define ABOUT_ONE_SECOND 74067512
80 // Update this if uBlaze/Zynq CPU core frequency is changed, or if the external memory timing changes.
81 // Although emprirically tested to 1.0000003 seconds, it is not meant to be used for precise timing purposes
82
83 #define INPUT_STRING_MAX_SIZE 16
84
85 struct maximDateTime
86 {
87 u8 uchHour;
88 u8 uchMinute;
89 u8 uchSecond;
90 u8 uchMonth;
91 u8 uchDate;
92 u8 uchYear;
93 u8 uchDow;
94 };
95
96 struct maximOLEDDisplay
97 {
98 XGpio xgpioPort;
99 u8 portStatus;
100 u8 writeBuffer[512];
101 u8 flippedBuffer[512];
102 u8 *font;
103 };
104 extern XGpio g_xGpioLed;
105 extern u8 g_uchAtoDConverterChannel;
106 extern u32 g_unSampleSize;
107 extern int g_nSampleRate;
108 extern char g_sInputString[ INPUT_STRING_MAX_SIZE ]; //This string will hold user input from terminal.
109 extern struct maximOLEDDisplay g_structureOLED;
110 extern char g_tempString[32];
111
112 #endif /* MAXREFDES14_H_ */