Migrate all Miniware devices to use Bit-Bang I2C (#1838)
* MHP30 move to I2C Bit Banging * Fixup Accelerometer drivers so all can use I2CBB * No STM32 I2C driver anymore * TS100 on I2CBB * Miniware on BB * Fixup S60 build * format format
This commit is contained in:
@@ -86,7 +86,7 @@
|
||||
#define POWER_PULSE_DEFAULT 0
|
||||
#else
|
||||
#define POWER_PULSE_DEFAULT 5
|
||||
#endif /* TS100 */
|
||||
#endif /* TS100 */
|
||||
#define POWER_PULSE_WAIT_DEFAULT 4 // Default rate of the power pulse: 4*2500 = 10000 ms = 10 s
|
||||
#define POWER_PULSE_DURATION_DEFAULT 1 // Default duration of the power pulse: 1*250 = 250 ms
|
||||
|
||||
@@ -156,6 +156,10 @@
|
||||
#define MIN_BOOST_TEMP_C 250 // The min settable temp for boost mode °C
|
||||
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
|
||||
|
||||
// Miniware cant be trusted, and keep using the GD32 randomly now, so assume they will clones in the future
|
||||
|
||||
#define I2C_SOFT_BUS_1 1
|
||||
|
||||
#ifdef MODEL_TS100
|
||||
#define VOLTAGE_DIV 467 // 467 - Default divider from schematic
|
||||
#define CALIBRATION_OFFSET 900 // 900 - Default adc offset in uV
|
||||
@@ -165,8 +169,9 @@
|
||||
#define POWER_LIMIT_STEPS 5
|
||||
#define OP_AMP_GAIN_STAGE OP_AMP_GAIN_STAGE_TS100
|
||||
#define TEMP_uV_LOOKUP_HAKKO
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
|
||||
#define USB_PD_VMAX 20 // Maximum voltage for PD to negotiate
|
||||
#define OLED_I2CBB1 1
|
||||
#define ACCEL_I2CBB1 1
|
||||
#define HARDWARE_MAX_WATTAGE_X10 750
|
||||
#define TIP_THERMAL_MASS 65 // X10 watts to raise 1 deg C in 1 second
|
||||
#define TIP_RESISTANCE 75 // x10 ohms, 7.5 typical for ts100 tips
|
||||
@@ -194,7 +199,6 @@
|
||||
#define POW_DC 1
|
||||
#define POW_PD 1
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define I2C_SOFT_BUS_1 1
|
||||
#define OLED_I2CBB1 1
|
||||
#define USB_PD_I2CBB2 1
|
||||
#define USB_PD_VMAX 28 // Device supposedly can do 28V; looks like vmax is 33 ish
|
||||
@@ -218,7 +222,7 @@
|
||||
|
||||
#define TIP_THERMAL_MASS 40
|
||||
#define TIP_RESISTANCE 45 // x10 ohms, 4.5 typical for ts80 tips
|
||||
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define LIS_ORI_FLIP
|
||||
#define OLED_FLIP
|
||||
#endif /* TS80(P) */
|
||||
@@ -228,6 +232,8 @@
|
||||
#define CALIBRATION_OFFSET 900 // the adc offset in uV
|
||||
#define PID_POWER_LIMIT 35 // Sets the max pwm power limit
|
||||
#define POWER_LIMIT 32 // 24 watts default power limit
|
||||
#define OLED_I2CBB1 1
|
||||
#define ACCEL_I2CBB1 1
|
||||
|
||||
#define HARDWARE_MAX_WATTAGE_X10 320
|
||||
|
||||
@@ -237,17 +243,18 @@
|
||||
#endif /* TS80 */
|
||||
|
||||
#ifdef MODEL_TS80P
|
||||
#define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors
|
||||
#define CALIBRATION_OFFSET 1500 // the adc offset in uV
|
||||
#define PID_POWER_LIMIT 35 // Sets the max pwm power limit
|
||||
#define POWER_LIMIT 32 // 30 watts default power limit
|
||||
|
||||
#define VOLTAGE_DIV 650 // Default for TS80P with slightly different resistors
|
||||
#define CALIBRATION_OFFSET 1500 // the adc offset in uV
|
||||
#define PID_POWER_LIMIT 35 // Sets the max pwm power limit
|
||||
#define POWER_LIMIT 32 // 30 watts default power limit
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define HARDWARE_MAX_WATTAGE_X10 320
|
||||
#define OLED_I2CBB1 1
|
||||
#define ACCEL_I2CBB1 1
|
||||
|
||||
#define POW_PD 1
|
||||
#define POW_QC 1
|
||||
#define TEMP_NTC
|
||||
#define I2C_SOFT_BUS_2 1
|
||||
#define SC7_ORI_FLIP
|
||||
#endif /* TS80P */
|
||||
|
||||
@@ -255,8 +262,8 @@
|
||||
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
|
||||
#else
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
#define FLASH_LOGOADDR (0x08000000 + (62 * 1024))
|
||||
#define SETTINGS_START_PAGE (0x08000000 + (63 * 1024))
|
||||
#endif /* TS101 */
|
||||
|
||||
#endif /* CONFIGURATION_H_ */
|
||||
|
||||
Reference in New Issue
Block a user