1
0
forked from me/IronOS

Merge branch 'dev' into epr-pinecil-og

This commit is contained in:
discip
2023-06-29 21:58:29 +02:00
committed by GitHub
211 changed files with 77727 additions and 1613 deletions

View File

@@ -87,6 +87,7 @@ bool isTipDisconnected() {
}
void setStatusLED(const enum StatusLED state) {}
void setBuzzer(bool on) {}
uint8_t preStartChecks() { return 1; }
uint64_t getDeviceID() { return dbg_id_get(); }
@@ -95,4 +96,5 @@ uint8_t getTipResistanceX10() { return TIP_RESISTANCE; }
uint8_t preStartChecksDone() { return 1; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipThermalMass() { return TIP_THERMAL_MASS; }
uint8_t getTipInertia() { return TIP_THERMAL_MASS; }

View File

@@ -93,7 +93,7 @@ void setTipPWM(const uint8_t pulse, const bool shouldUseFastModePWM) {
extern osThreadId POWTaskHandle;
void EXTI5_9_IRQHandler(void) {
#if POW_PD
#ifdef POW_PD
if (RESET != exti_interrupt_flag_get(EXTI_5)) {
exti_interrupt_flag_clear(EXTI_5);

View File

@@ -7,7 +7,7 @@
#include "configuration.h"
void power_check() {
#if POW_PD
#ifdef POW_PD
// Cant start QC until either PD works or fails
if (!USBPowerDelivery::negotiationComplete()) {
return;
@@ -22,7 +22,7 @@ void power_check() {
}
bool getIsPoweredByDCIN() {
#if POW_PD
#ifdef POW_PD
if (!USBPowerDelivery::negotiationComplete()) {
return false; // We are assuming not dc while negotiating
}

View File

@@ -59,6 +59,15 @@
#define ORIENTATION_MODE 2 // 0: Right 1:Left 2:Automatic - Default Automatic
#define REVERSE_BUTTON_TEMP_CHANGE 0 // 0:Default 1:Reverse - Reverse the plus and minus button assigment for temperature change
/**
* OLED Brightness
*
*/
#define MIN_BRIGHTNESS 0 // Min OLED brightness selectable
#define MAX_BRIGHTNESS 100 // Max OLED brightness selectable
#define BRIGHTNESS_STEP 25 // OLED brightness increment
#define DEFAULT_BRIGHTNESS 25 // default OLED brightness
/**
* Temp change settings
*/
@@ -77,7 +86,7 @@
#define POWER_PULSE_DEFAULT 0
#else
#define POWER_PULSE_DEFAULT 5
#endif
#endif /* Pinecil */
#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
@@ -133,11 +142,12 @@
#define MAX_TEMP_C 450 // Max soldering temp selectable °C
#define MAX_TEMP_F 850 // Max soldering temp selectable °F
#define MIN_TEMP_C 10 // Min soldering temp selectable °C
#define MIN_TEMP_F 60 // Min soldering temp selectable °F
#define MIN_TEMP_F 50 // Min soldering temp selectable °F
#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
#define POW_PD 1
#define POW_PD_EXT 0
#define POW_QC 1
#define POW_DC 1
#define POW_QC_20V 1
@@ -154,9 +164,12 @@
#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 Pinecil tips
#endif
#endif
#define CANT_DIRECT_READ_SETTINGS
#endif /* Pinecil */
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
#define FLASH_LOGOADDR (0x08000000 + (126 * 1024))
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
#define HAS_POWER_DEBUG_MENU
#endif /* CONFIGURATION_H_ */

View File

@@ -10,7 +10,7 @@
#include "gd32vf103_libopt.h"
#include "string.h"
#define FMC_PAGE_SIZE ((uint16_t)0x400U)
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
/* unlock the flash program/erase controller */

View File

@@ -1,5 +1,5 @@
#include "configuration.h"
#if POW_PD
#ifdef POW_PD
#include "BSP.h"
#include "I2C_Wrapper.hpp"
#include "Setup.h"