monoZ docs
MZ_gpio_instance.c
Go to the documentation of this file.
1
/*
2
* MZ_gpio_instance.c
3
*
4
* Created on: 16-Mar-2022
5
* Author: Mahendra
6
*/
7
#include "
MZ_gpio_instance.h
"
8
#include "
MZ_public.h
"
9
#include "
MZ_error_handler.h
"
10
#include "
MZ_gpio.h
"
11
12
13
14
MZ_GPIO_INIT_ST
gpio_instance1
=
15
{
16
.Init.Pin =
MZ_GPIO_PIN1
,
17
.Init.Mode =
MZ_GPIO_MODE1
,
18
.Init.Pull =
MZ_GPIO_PULL1
,
19
.Init.Speed =
MZ_GPIO_SPEED1
,
20
.Init.Alternate =
MZ_GPIO_ALTERNATE1
,
21
};
22
23
24
mz_error_t
gpio_init1
()
25
{
26
mz_error_t
_ret =
MZ_OK
;
27
if
(
MZ_OK
!=
MZ_GPIO_Init
(
MZ_PORT_GPIO1
,&
gpio_instance1
))
28
{
29
// _ret = MZ_FAIL;
30
}
31
return
_ret;
32
}
33
MZ_error_handler.h
monoZ Error Handler
mz_error_t
mz_error_t
Enumeration of monoZ Error Flags.
Definition:
MZ_error_handler.h:19
MZ_OK
@ MZ_OK
Definition:
MZ_error_handler.h:20
MZ_gpio.h
This file includes Monoz GPIO Related APIs.
gpio_instance1
MZ_GPIO_INIT_ST gpio_instance1
Definition:
MZ_gpio_instance.c:14
gpio_init1
mz_error_t gpio_init1()
Definition:
MZ_gpio_instance.c:24
MZ_gpio_instance.h
MZ_GPIO_MODE1
#define MZ_GPIO_MODE1
Definition:
MZ_gpio_instance.h:15
MZ_GPIO_PULL1
#define MZ_GPIO_PULL1
Definition:
MZ_gpio_instance.h:17
MZ_PORT_GPIO1
#define MZ_PORT_GPIO1
Definition:
MZ_gpio_instance.h:23
MZ_GPIO_SPEED1
#define MZ_GPIO_SPEED1
Definition:
MZ_gpio_instance.h:19
MZ_GPIO_ALTERNATE1
#define MZ_GPIO_ALTERNATE1
Definition:
MZ_gpio_instance.h:21
MZ_GPIO_PIN1
#define MZ_GPIO_PIN1
Definition:
MZ_gpio_instance.h:13
MZ_public.h
monoZ Public All peripheral Configurations will send to monoZ library through this file
MZ_GPIO_Init
mz_error_t MZ_GPIO_Init(MZ_GPIOX_BTYPE_PTR GPIOx, MZ_GPIO_INIT_ST *GPIO_Init)
This function is used for initilization of gpio with specific settings.
tool_gen
MZ_gpio_instance.c
Generated by
1.9.3