Clean up macros

This commit is contained in:
Rune Harlyk
2026-02-09 15:41:55 +01:00
committed by Rune Harlyk
parent 43e7f13888
commit eba00f98cd
3 changed files with 5 additions and 26 deletions
+4 -2
View File
@@ -38,6 +38,9 @@
#error Target CONFIG_IDF_TARGET is not supported
#endif
/*
* I2C software connection
*/
#if CONFIG_IDF_TARGET_ESP32P4
#ifndef SDA_PIN
#define SDA_PIN 7
@@ -53,7 +56,6 @@
#define SCL_PIN 22
#endif
#endif
#ifndef I2C_FREQUENCY
#define I2C_FREQUENCY 100000UL
#define I2C_FREQUENCY 1000000UL
#endif
+1 -22
View File
@@ -3,28 +3,7 @@
#include <template/state_result.h>
#include <sdkconfig.h>
#include <platform_shared/api.pb.h>
/*
* I2C software connection
*/
#if CONFIG_IDF_TARGET_ESP32P4
#ifndef SDA_PIN
#define SDA_PIN 7
#endif
#ifndef SCL_PIN
#define SCL_PIN 8
#endif
#else
#ifndef SDA_PIN
#define SDA_PIN 21
#endif
#ifndef SCL_PIN
#define SCL_PIN 22
#endif
#endif
#ifndef I2C_FREQUENCY
#define I2C_FREQUENCY 1000000UL
#endif
#include <global.h>
// Use proto types directly
using PinConfig = api_PinConfig;