ICARUS OS (Intelligent Cooperative Architecture for Real-time Unified Systems) 0.1.0
Preemptive Real-Time Operating System for ARM Cortex-M7
Loading...
Searching...
No Matches
gpio.c
Go to the documentation of this file.
1/* USER CODE BEGIN Header */
19/* USER CODE END Header */
20
21/* Includes ------------------------------------------------------------------*/
22#include "bsp/gpio.h"
23
24/* USER CODE BEGIN 0 */
25
26/* USER CODE END 0 */
27
28/*----------------------------------------------------------------------------*/
29/* Configure GPIO */
30/*----------------------------------------------------------------------------*/
31/* USER CODE BEGIN 1 */
32
33/* USER CODE END 1 */
34
43void MX_GPIO_Init(void)
44{
45
46 GPIO_InitTypeDef GPIO_InitStruct = {0};
47
48 /* GPIO Ports Clock Enable */
49 __HAL_RCC_GPIOE_CLK_ENABLE();
50 __HAL_RCC_GPIOC_CLK_ENABLE();
51 __HAL_RCC_GPIOH_CLK_ENABLE();
52 __HAL_RCC_GPIOB_CLK_ENABLE();
53 __HAL_RCC_GPIOA_CLK_ENABLE();
54
55 /*Configure GPIO pin Output Level */
56 HAL_GPIO_WritePin(E3_GPIO_Port, E3_Pin, GPIO_PIN_RESET);
57
58 /*Configure GPIO pin Output Level */
59 HAL_GPIO_WritePin(GPIOE, LCD_CS_Pin|LCD_WR_RS_Pin, GPIO_PIN_SET);
60
61 /*Configure GPIO pin : E3_Pin */
62 GPIO_InitStruct.Pin = E3_Pin;
63 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
64 GPIO_InitStruct.Pull = GPIO_NOPULL;
65 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
66 HAL_GPIO_Init(E3_GPIO_Port, &GPIO_InitStruct);
67
68 /*Configure GPIO pin : KEY_Pin */
69 GPIO_InitStruct.Pin = KEY_Pin;
70 GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
71 GPIO_InitStruct.Pull = GPIO_PULLDOWN;
72 HAL_GPIO_Init(KEY_GPIO_Port, &GPIO_InitStruct);
73
74 /*Configure GPIO pins : LCD_CS_Pin LCD_WR_RS_Pin */
75 GPIO_InitStruct.Pin = LCD_CS_Pin|LCD_WR_RS_Pin;
76 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
77 GPIO_InitStruct.Pull = GPIO_NOPULL;
78 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
79 HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
80
81}
82
83/* USER CODE BEGIN 2 */
84
85/* USER CODE END 2 */
#define KEY_Pin
Definition config.h:136
#define KEY_GPIO_Port
Definition config.h:137
#define LCD_WR_RS_Pin
Definition config.h:140
#define LCD_CS_Pin
Definition config.h:138
#define E3_Pin
Definition config.h:134
#define E3_GPIO_Port
Definition config.h:135
void MX_GPIO_Init(void)
Configure pins PC14-OSC32_IN (OSC32_IN) ---—> RCC_OSC32_IN PC15-OSC32_OUT (OSC32_OUT) ---—> RCC_OSC32...
Definition gpio.c:43
This file contains all the function prototypes for the gpio.c file.