Mercurial > public > ostc4
comparison Small_CPU/Src/gpio.c @ 938:df87dbfc9c21 Evo_2_23
Update GPIO:
Splitted the init function and moved GPS deactivation into the sleep loop (deep sleep)
author | Ideenmodellierer |
---|---|
date | Tue, 10 Dec 2024 21:00:55 +0100 |
parents | f2494a708f52 |
children |
comparison
equal
deleted
inserted
replaced
937:d461d9e89e3c | 938:df87dbfc9c21 |
---|---|
54 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; | 54 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; |
55 GPIO_InitStructure.Pull = GPIO_PULLDOWN; | 55 GPIO_InitStructure.Pull = GPIO_PULLDOWN; |
56 GPIO_InitStructure.Speed = GPIO_SPEED_LOW; | 56 GPIO_InitStructure.Speed = GPIO_SPEED_LOW; |
57 HAL_GPIO_Init( GPIOA, &GPIO_InitStructure); | 57 HAL_GPIO_Init( GPIOA, &GPIO_InitStructure); |
58 HAL_GPIO_WritePin( GPIOA, VIBRATION_CONTROL_PIN, GPIO_PIN_RESET); | 58 HAL_GPIO_WritePin( GPIOA, VIBRATION_CONTROL_PIN, GPIO_PIN_RESET); |
59 } | |
60 | |
61 void GPIO_GNSS_Init() | |
62 { | |
63 GPIO_InitTypeDef GPIO_InitStructure; | |
59 | 64 |
60 __GPIOB_CLK_ENABLE(); | 65 __GPIOB_CLK_ENABLE(); |
61 GPIO_InitStructure.Pin = GPS_POWER_CONTROL_PIN; | 66 GPIO_InitStructure.Pin = GPS_POWER_CONTROL_PIN; |
62 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; | 67 GPIO_InitStructure.Mode = GPIO_MODE_OUTPUT_PP; |
63 GPIO_InitStructure.Pull = GPIO_PULLUP; | 68 GPIO_InitStructure.Pull = GPIO_PULLUP; |