monoZ docs
MZ_public.h
Go to the documentation of this file.
1
9#ifndef MZ_PUBLIC_H_
10#define MZ_PUBLIC_H_
11#ifdef __cplusplus
12extern "C" {
13#endif
14#include "MZ_common.h"
15
20typedef struct
21{
22 USART_TypeDef *Instance;
23 UART_InitTypeDef Init;
24 UART_AdvFeatureInitTypeDef AdvancedInit;
26
36typedef struct
37{
38 I2C_TypeDef *Instance;
39 I2C_InitTypeDef Init;
40// UART_AdvFeatureInitTypeDef AdvancedInit; /*!< I2C Advanced Features initialization parameters */
42
53typedef struct
54{
55#if(MZ_MODEM != MZ_ENABLE)&&(MZ_UART1 == MZ_ENABLE)
56 uint8_t u1:1;
57#endif
58#if(MZ_CLI != MZ_ENABLE)&&(MZ_UART2 == MZ_ENABLE)
59 uint8_t u2:1;
60#endif
61#if(MZ_UART3 == MZ_ENABLE)
62 uint8_t u3:1;
63#endif
64#if(MZ_UART4 == MZ_ENABLE)
65 uint8_t u4:1;
66#endif
67#if(MZ_UART5 == MZ_ENABLE)
68 uint8_t u5:1;
69#endif
70#if(MZ_LPUART1 == MZ_ENABLE)
71 uint8_t lu1:1;
72#endif
73#if(MZ_MODEM != MZ_ENABLE)&&(MZ_UART1 == MZ_ENABLE)
75#endif
76#if(MZ_CLI != MZ_ENABLE)&&(MZ_UART2 == MZ_ENABLE)
78#endif
79#if(MZ_UART3 == MZ_ENABLE)
81#endif
82#if(MZ_UART4 == MZ_ENABLE)
84#endif
85#if(MZ_UART5 == MZ_ENABLE)
87#endif
88#if(MZ_LPUART1 == MZ_ENABLE)
90#endif
92
93
98typedef struct
99{
100#if(MZ_I2C1 == MZ_ENABLE)
101 uint8_t i1:1;
102#endif
103#if(MZ_I2C2 == MZ_ENABLE)
104 uint8_t i2:1;
105#endif
106#if(MZ_I2C3 == MZ_ENABLE)
107 uint8_t i3:1;
108#endif
109#if(MZ_I2C4 == MZ_ENABLE)
110 uint8_t i4:1;
111#endif
112#if(MZ_I2C1 == MZ_ENABLE)
113 MZ_I2C_INIT_PTR i1p;
114#endif
115#if(MZ_I2C2 == MZ_ENABLE)
117#endif
118#if(MZ_I2C3 == MZ_ENABLE)
119 MZ_I2C_INIT_PTR i3p;
120#endif
121#if(MZ_I2C4 == MZ_ENABLE)
123#endif
125
126
127/*
128 * Sample Template for the hardware context variable to initialize to use
129 * peripherals. The name uart_enable_cfg and i2c_enable_cfg are fixed.
130 * User need to define the context with this exact name.
131 *
132 * extern MZ_UART_INIT_ST sample_uart_instance;
133 * uart_enable uart_enable_cfg =
134 * {
135 * .u3 = MZI_UART3,
136 * .u3p = &sample_uart_instance,
137 * .lu1 = MZI_LPUART1,
138 * .lu1p = 0,
139 * };
140 *
141 * extern MZ_I2C_INIT_ST sample_i2c_instance;
142 *
143 * i2c_enable i2c_enable_cfg =
144 * {
145 * .i2 = MZI_I2C2,
146 * .i2p = &sample_i2c_instance,
147 * .i4 = MZI_I2C4,
148 * .i4p = 0,
149 * };
150 */
151
152
153#ifdef __cplusplus
154}
155#endif
156#endif /* MZ_PUBLIC_H_ */
157
monoZ Lib Common.
MZ_UART_INIT_ST * MZ_UART_INIT_PTR
[TODO]
Definition: MZ_public.h:31
MZ_I2C_INIT_ST * MZ_I2C_INIT_PTR
[TODO]
Definition: MZ_public.h:47
Structure for I2C Initialization.
Definition: MZ_public.h:37
I2C_InitTypeDef Init
Definition: MZ_public.h:39
I2C_TypeDef * Instance
Definition: MZ_public.h:38
Structure for monoZ UART Initialization parameters.
Definition: MZ_public.h:21
USART_TypeDef * Instance
Definition: MZ_public.h:22
UART_AdvFeatureInitTypeDef AdvancedInit
Definition: MZ_public.h:24
UART_InitTypeDef Init
Definition: MZ_public.h:23
Structure for I2C Initialization and configuration.
Definition: MZ_public.h:99
MZ_I2C_INIT_PTR i4p
Definition: MZ_public.h:122
uint8_t i4
Definition: MZ_public.h:110
MZ_I2C_INIT_PTR i2p
Definition: MZ_public.h:116
uint8_t i2
Definition: MZ_public.h:104
Structure for UART Initialization and configuration.
Definition: MZ_public.h:54
uint8_t u3
Definition: MZ_public.h:62
MZ_UART_INIT_PTR lu1p
Definition: MZ_public.h:89
uint8_t lu1
Definition: MZ_public.h:71
MZ_UART_INIT_PTR u3p
Definition: MZ_public.h:80