| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- /*
- * HAL_config.h
- *
- * Created on: Oct 27, 2025
- * Author: juraj
- */
- #ifndef INC_HAL_STM32_CONFIG_H_
- #define INC_HAL_STM32_CONFIG_H_
- #define USE_SPI 1
- #if (!USE_SPI && defined(HAL_I2C_MODULE_ENABLED))
- #define IS_SPI false
- #endif
- #if (USE_SPI && defined(HAL_SPI_MODULE_ENABLED))
- #define IS_SPI true
- #endif // BUS_SELECT
- #ifdef HAL_SPI_MODULE_ENABLED
- extern SPI_HandleTypeDef hspi1;
- #define CHIP_SELECT_PIN SPI1_CS_Pin
- #define CHIP_SELECT_PORT SPI1_CS_GPIO_Port
- #define SPI_INSTANCE hspi1
- #endif // HAL_SPI_MODULE_ENABLED
- #ifdef HAL_I2C_MODULE_ENABLED
- extern I2C_HandleTypeDef hi2c1;
- #define I2C_INSTANCE hi2c1
- #define I2C_ADDRESS 0x69
- #endif // HAL_I2C_MODULE_ENABLED
- #endif /* INC_HAL_STM32_CONFIG_H_ */
|