ports/stm32: Disable Soft-I2C if not configured for a board.

This commit is contained in:
iabdalkader 2022-07-10 17:37:02 +02:00
parent 60457cca3c
commit 5c4ed47c8b

View File

@ -16,6 +16,7 @@
#include "soft_i2c.h"
#include "omv_boardconfig.h"
#if defined(SOFT_I2C_PORT)
#define ACK 0
#define NACK 1
@ -176,3 +177,4 @@ void soft_i2c_deinit()
HAL_GPIO_DeInit(SOFT_I2C_PORT, SOFT_I2C_SIOC_PIN);
HAL_GPIO_DeInit(SOFT_I2C_PORT, SOFT_I2C_SIOD_PIN);
}
#endif // defined(SOFT_I2C_PORT)