|
F439_CPP_MPL3115A2_Project_01 1.0
STM32F439 MPL3115A2 pressure and temperature tutorial
|
: Common application definitions for the MPL3115A2 tutorial. More...
#include "stm32f4xx_hal.h"Go to the source code of this file.
Macros | |
| #define | REDIRECT_PRINTF |
| Enable printf redirection to USART1 through __io_putchar(). | |
Functions | |
| void | Error_Handler (void) |
| This function is executed in case of error occurrence. | |
| void | reset_I2C (void) |
| Recover and reinitialize the I2C1 bus. | |
: Common application definitions for the MPL3115A2 tutorial.
Copyright (c) 2026 STMicroelectronics. All rights reserved.
This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.
Definition in file main.h.
| #define REDIRECT_PRINTF |
| void Error_Handler | ( | void | ) |
This function is executed in case of error occurrence.
| None |
Definition at line 416 of file main.c.
Referenced by main(), MPL3115A2_Init(), MX_I2C1_Init(), MX_USART1_UART_Init(), and SystemClock_Config().
| void reset_I2C | ( | void | ) |
Recover and reinitialize the I2C1 bus.
Recover and reinitialize the I2C1 bus.
Recover the I2C1 bus by manually clocking SCL before reinitialization.
This helper is used when the MPL3115A2 does not immediately respond during startup. PB8 is temporarily configured as an open-drain GPIO and toggled to help release a stuck slave before I2C1 is initialized again.
Definition at line 97 of file main.c.
References MX_I2C1_Init().
Referenced by MPL3115A2_Init().