diff --git a/Documentation/Flashing.md b/Documentation/Flashing.md index f98e322b..761b9d7c 100644 --- a/Documentation/Flashing.md +++ b/Documentation/Flashing.md @@ -133,6 +133,30 @@ dfu-util -D Pinecil_EN.dfu -a 0 - Switch to a different PC/Laptop and use different ports. USB-C ports are recommended but some have also reported having a fussy C port. - Hold down the (-) button for the entire firmware update, do not release until near the end. - `DC Low` message: a pc/laptop cannot fully power Pinecil, it generally can only get 5 V (non-PD) to communicate for firmware updates and Pinecil will report 'DC Low'. This is normal. +- If `dfu-util` aborts with an error like + ``` + dfu-util: Cannot open DFU device 28e9:0189 found on devnum 42 (LIBUSB_ERROR_IO) + ``` + and `dmesg` reports USB errors like these + ``` + kernel: usb 1-1: reset full-speed USB device number 42 using xhci_hcd + kernel: usb 1-1: device descriptor read/64, error -71 + kernel: usb 1-1: device descriptor read/64, error -71 + kernel: usb 1-1: reset full-speed USB device number 42 using xhci_hcd + kernel: usb 1-1: device descriptor read/64, error -71 + kernel: usb 1-1: device descriptor read/64, error -71 + kernel: usb 1-1: reset full-speed USB device number 42 using xhci_hcd + kernel: usb 1-1: Device not responding to setup address. + kernel: usb 1-1: Device not responding to setup address. + kernel: usb 1-1: device not accepting address 42, error -71 + ``` + then try to disable USB autosuspend. + This can be done with a set of udev rules specifically for the Pinecil: + ```udev + SUBSYSTEM=="usb", ATTR{idVendor}=="28e9", ATTR{idProduct}=="0189", MODE:="0660" + SUBSYSTEM=="usb", ATTR{idVendor}=="28e9", ATTR{idProduct}=="0189", GROUP="plugdev" + SUBSYSTEM=="usb", ATTR{idVendor}=="28e9", ATTR{idProduct}=="0189", TEST=="power/control", ATTR{power/control}="on" + ``` ## Windows diff --git a/Translations/translation_BE.json b/Translations/translation_BE.json index 94b3cb8a..b7674ff4 100644 --- a/Translations/translation_BE.json +++ b/Translations/translation_BE.json @@ -109,7 +109,7 @@ }, "CooldownBlink": { "text2": ["Мігценне t°", "пры астуджэнні"], - "desc": "Міргаць тэмпературай на экране астуджэння, пакуль джага яшчэ гарачае" + "desc": "Міргаць тэмпературай на экране астуджэння, пакуль джала яшчэ гарачае" }, "TemperatureCalibration": { "text2": ["Каліброўка", "тэмпературы"], @@ -157,7 +157,7 @@ }, "PowerPulsePower": { "text2": ["Сіла імп.", "сілкав. Вт"], - "desc": "Сіла імпульса щтрымливаючага ад сну павербанку ці іншай крыніцы сілкавання" + "desc": "Сіла імпульса ўтрымливаючага ад сну павербанку ці іншай крыніцы сілкавання" }, "HallEffSensitivity": { "text2": ["Эфект Хола", "адчувальнасць"], @@ -177,7 +177,7 @@ }, "AnimSpeed": { "text2": ["Хуткасць", "анімацыі"], - "desc": "Хуткасць анімацыі гузікаў у галоўным меню (Мілісекунды) (А=Адключана | Н=Нізкі | С=Сярэдні | В=Высокі)" + "desc": "Хуткасць анімацыі гузікаў у галоўным меню (Мілісекунды) (А=Адключана | Н=Нізкая | С=Сярэдняя | В=Высокая)" }, "PowerPulseWait": { "text2": ["Імпульс магутнасці", "час чакання"], @@ -201,7 +201,7 @@ }, "LOGOTime": { "text2": ["Лагатып загрузкі", "працягласць"], - "desc": "Усталяваць працягласць лагатыпа загрузки (s=Секунды)" + "desc": "Усталяваць працягласць лагатыпа загрузкі (s=Секунды)" } } } diff --git a/Translations/translation_CS.json b/Translations/translation_CS.json index 4f5a53be..e7124fce 100644 --- a/Translations/translation_CS.json +++ b/Translations/translation_CS.json @@ -1,207 +1,339 @@ { - "languageCode": "CS", - "languageLocalName": "Český", - "fonts": ["ascii_basic", "latin_extended"], - "tempUnitFahrenheit": false, - "messages": { - "SettingsCalibrationWarning": "Ujistěte se, že hrot má pokojovou teplotu!", - "SettingsResetWarning": "Opravdu chcete resetovat zařízení do továrního nastavení?", - "UVLOWarningString": "Nízké DC", - "UndervoltageString": "! Nízké napětí !", - "InputVoltageString": "Napětí: ", - "SleepingSimpleString": "Zzz ", - "SleepingAdvancedString": "Režim spánku...", - "SleepingTipAdvancedString": "Hrot:", - "OffString": "Vyp" - }, - "messagesWarn": { - "ResetOKMessage": "Reset OK", - "SettingsResetMessage": ["Tov. nas. obnov.", ""], - "NoAccelerometerMessage": ["No accelerometer", "detected!"], - "NoPowerDeliveryMessage": ["No USB-PD IC", "detected!"], - "LockingKeysString": "LOCKED", - "UnlockingKeysString": "UNLOCKED", - "WarningKeysLockedString": "!LOCKED!", - "WarningThermalRunaway": ["Thermal", "Runaway"] - }, - "characters": { - "SettingRightChar": "P", - "SettingLeftChar": "L", - "SettingAutoChar": "A", - "SettingOffChar": "O", - "SettingSlowChar": "P", - "SettingMediumChar": "M", - "SettingFastChar": "R", - "SettingStartNoneChar": "O", - "SettingStartSolderingChar": "P", - "SettingStartSleepChar": "S", - "SettingStartSleepOffChar": "M", - "SettingSensitivityOff": "O", - "SettingSensitivityLow": "L", - "SettingSensitivityMedium": "M", - "SettingSensitivityHigh": "H", - "SettingLockDisableChar": "D", - "SettingLockBoostChar": "B", - "SettingLockFullChar": "F" - }, - "menuGroups": { - "PowerMenu": { - "text2": ["Power", "settings"], - "desc": "Power settings" - }, - "SolderingMenu": { - "text2": ["Pájecí", "nastavení"], - "desc": "Nastavení pájení (boost, auto start...)." - }, - "PowerSavingMenu": { - "text2": ["Režim", "spánku"], - "desc": "Nastavení režimu spánku, automatického vypnutí..." - }, - "UIMenu": { - "text2": ["Uživatelské", "rozhraní"], - "desc": "Nastavení uživatelského rozhraní." - }, - "AdvancedMenu": { - "text2": ["Pokročilé", "volby"], - "desc": "Pokročilé volby (detailní obrazovky, kalibrace, tovární nastavení...)." - } - }, - "menuOptions": { - "DCInCutoff": { - "text2": ["Zdroj", "napájení"], - "desc": "Při nižším napětí ukončí pájení (DC=10V | ?S=?x3,3V pro LiPo, LiIon...)." - }, - "SleepTemperature": { - "text2": ["Teplota v", "r. spánku"], - "desc": "Teplota v režimu spánku." - }, - "SleepTimeout": { - "text2": ["Čas do", "r. spánku"], - "desc": "Čas do režimu spánku (Minut | Sekund)." - }, - "ShutdownTimeout": { - "text2": ["Čas do", "vypnutí"], - "desc": "Čas do automatického vypnutí (Minut)." - }, - "MotionSensitivity": { - "text2": ["Citlivost", "det. pohybu"], - "desc": "Citlivost detekce pohybu (0=Vyp | 1=Min | ... | 9=Max)." - }, - "TemperatureUnit": { - "text2": ["Jednotky", "teploty"], - "desc": "Jednotky měření teploty (C=Celsius | F=Fahrenheit)." - }, - "AdvancedIdle": { - "text2": ["Podrobnosti", "na vých. obr."], - "desc": "Zobrazit podrobnosti na výchozí obrazovce?" - }, - "DisplayRotation": { - "text2": ["Orientace", "obrazovky"], - "desc": "Orientace obrazovky (P=Pravák | L=Levák | A=Auto)." - }, - "BoostTemperature": { - "text2": ["Teplota v", "r. boost"], - "desc": "Teplota v režimu boost." - }, - "AutoStart": { - "text2": ["Automatický", "start"], - "desc": "Při startu ihned nahřát hrot? (O=Pryč | P=Pájení | S=Spát | M=Spát teplota místnosti)" - }, - "CooldownBlink": { - "text2": ["Blikáni při", "chladnutí"], - "desc": "Blikání teploty při chladnutí, dokud je hrot horký?" - }, - "TemperatureCalibration": { - "text2": ["Kalibrovat", "teplotu?"], - "desc": "Kalibrace měření teploty." - }, - "SettingsReset": { - "text2": ["Tovární", "nastavení?"], - "desc": "Obnovení továrního nastavení." - }, - "VoltageCalibration": { - "text2": ["Kalibrovat", "vstupní napětí?"], - "desc": "Kalibrace vstupního napětí. Tlačítky uprav, podržením potvrď." - }, - "AdvancedSoldering": { - "text2": ["Podrobnosti", "při pájení"], - "desc": "Zobrazit podrobnosti při pájení?" - }, - "ScrollingSpeed": { - "text2": ["Rychlost", "popisků"], - "desc": "Rychlost posuvu popisků podobných tomuto (P=Pomalu | R=Rychle)" - }, - "QCMaxVoltage": { - "text2": ["Výkon", "ve wattech"], - "desc": "Výkon použítého napájecího adaptéru ve wattech." - }, - "PDNegTimeout": { - "text2": ["PD", "timeout"], - "desc": "PD negotiation timeout in 100ms steps for compatibility with some QC chargers (0: disabled)" - }, - "PowerLimit": { - "text2": ["Omezení", "Výkonu"], - "desc": "Maximální příkon (Watty)" - }, - "ReverseButtonTempChange": { - "text2": ["Prohodit", "tl. +-?"], - "desc": "Prohodí tlačítka plus a minus pro změnu teploty hrotu." - }, - "TempChangeShortStep": { - "text2": ["Krok teploty", "krátký?"], - "desc": "Velikost skoku při změně teploty krátkým stiskem tlačítka!" - }, - "TempChangeLongStep": { - "text2": ["Krok teploty", "dlouhý?"], - "desc": "Velikost skoku při změně teploty dlouhým stiskem tlačítka!" - }, - "PowerPulsePower": { - "text2": ["Intenzita", "Výkon. pulsu"], - "desc": "Puls pro udržení zařízení v chodu (kvůli power bankám)." - }, - "HallEffSensitivity": { - "text2": ["Hall sensor", "sensitivity"], - "desc": "Sensitivity of the Hall effect sensor to detect sleep (0=Vyp | 1=Min | ... | 9=Max)" - }, - "LockingMode": { - "text2": ["Allow locking", "buttons"], - "desc": "While soldering, hold down both buttons to toggle locking them (D=disable | B=boost mode only | F=full locking)" - }, - "MinVolCell": { - "text2": ["Minimum", "voltage"], - "desc": "Minimum allowed voltage per cell (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)" - }, - "AnimLoop": { - "text2": ["Anim.", "loop"], - "desc": "Loop icon animations in main menu" - }, - "AnimSpeed": { - "text2": ["Anim.", "speed"], - "desc": "Pace of icon animations in menu (O=off | P=slow | M=medium | R=fast)" - }, - "PowerPulseWait": { - "text2": ["Power pulse", "delay"], - "desc": "Delay before keep-awake-pulse is triggered (x 2,5s)" - }, - "PowerPulseDuration": { - "text2": ["Power pulse", "duration"], - "desc": "Keep-awake-pulse duration (x 250ms)" - }, - "LanguageSwitch": { - "text2": ["Řeč:", " CS Český"], - "desc": "" - }, - "Brightness": { - "text2": ["Screen", "brightness"], - "desc": "Adjust the brightness of the OLED screen" - }, - "ColourInversion": { - "text2": ["Invert", "screen"], - "desc": "Invert the colours of the OLED screen" - }, - "LOGOTime": { - "text2": ["Boot logo", "duration"], - "desc": "Sets the duration for the boot logo (s=seconds)" - } - } -} + "languageCode": "CS", + "languageLocalName": "Český", + "fonts": [ + "ascii_basic", + "latin_extended" + ], + "tempUnitFahrenheit": false, + "messages": { + "SettingsCalibrationWarning": "Ujistěte se, že hrot má pokojovou teplotu!", + "SettingsResetWarning": "Opravdu chcete resetovat zařízení do továrního nastavení?", + "UVLOWarningString": "Nízké DC", + "UndervoltageString": "Nízké napětí", + "InputVoltageString": "Napětí: ", + "SleepingSimpleString": "Zzz ", + "SleepingAdvancedString": "Režim spánku...", + "SleepingTipAdvancedString": "Hrot:", + "OffString": "Vyp" + }, + "messagesWarn": { + "ResetOKMessage": "Reset OK", + "SettingsResetMessage": [ + "Nějaká nastavení", + "byla změněna!" + ], + "NoAccelerometerMessage": [ + "Akcelerometr", + "nebyl detekován!" + ], + "NoPowerDeliveryMessage": [ + "Žádný IO USB-PD", + "nebyl detekován!" + ], + "LockingKeysString": "ZAMČENO", + "UnlockingKeysString": "ODEMČENO", + "WarningKeysLockedString": "ZAMČENO!", + "WarningThermalRunaway": [ + "Teplotní", + "Ochrana" + ] + }, + "characters": { + "SettingRightChar": "P", + "SettingLeftChar": "L", + "SettingAutoChar": "A", + "SettingOffChar": "D", + "SettingSlowChar": "P", + "SettingMediumChar": "S", + "SettingFastChar": "R", + "SettingStartNoneChar": "V", + "SettingStartSolderingChar": "P", + "SettingStartSleepChar": "S", + "SettingStartSleepOffChar": "M", + "SettingSensitivityOff": "O", + "SettingSensitivityLow": "M", + "SettingSensitivityMedium": "S", + "SettingSensitivityHigh": "V", + "SettingLockDisableChar": "Z", + "SettingLockBoostChar": "B", + "SettingLockFullChar": "U" + }, + "menuGroups": { + "PowerMenu": { + "text2": [ + "Napájecí", + "nastavení" + ], + "desc": "Nastavení napájení" + }, + "SolderingMenu": { + "text2": [ + "Pájecí", + "nastavení" + ], + "desc": "Nastavení pájení" + }, + "PowerSavingMenu": { + "text2": [ + "Režim", + "spánku" + ], + "desc": "Nastavení úspory energie" + }, + "UIMenu": { + "text2": [ + "Uživatelské", + "rozhraní" + ], + "desc": "Nastavení uživatelského rozhraní" + }, + "AdvancedMenu": { + "text2": [ + "Pokročilá", + "nastavení" + ], + "desc": "Pokročilá nastavení" + } + }, + "menuOptions": { + "DCInCutoff": { + "text2": [ + "Zdroj", + "napájení" + ], + "desc": "Při nižším napětí ukončit pájení (DC 10V) (S 3,3V na článek, zakázat omezení napájení)." + }, + "SleepTemperature": { + "text2": [ + "Teplota", + "ve spánku" + ], + "desc": "Teplota hrotu v režimu spánku." + }, + "SleepTimeout": { + "text2": [ + "Čas", + "do spánku" + ], + "desc": "\"Režim spánku\" naběhne v (s=sekundách | m=minutách)" + }, + "ShutdownTimeout": { + "text2": [ + "Čas do", + "vypnutí" + ], + "desc": "Interval automatického vypnutí (m=minut)" + }, + "MotionSensitivity": { + "text2": [ + "Citlivost", + "na pohyb" + ], + "desc": "0=vyp | 1=nejméně citlivé | ... | 9=nejvíce citlivé" + }, + "TemperatureUnit": { + "text2": [ + "Jednotka", + "teploty" + ], + "desc": "C=Celsius | F=Fahrenheit" + }, + "AdvancedIdle": { + "text2": [ + "Podrobná obr.", + "nečinnosti" + ], + "desc": "Zobrazit detailní informace malým fontem na obrazovce nečinnosti" + }, + "DisplayRotation": { + "text2": [ + "Orientace", + "obrazovky" + ], + "desc": "P=pravák | L=levák | A=automaticky" + }, + "BoostTemperature": { + "text2": [ + "Teplota", + "boostu" + ], + "desc": "Teplota hrotu v \"režimu boost\"" + }, + "AutoStart": { + "text2": [ + "Chování", + "při startu" + ], + "desc": "V=vypnuto | P=pájecí teplota | S=spánková teplota | M=zahřát hrot po pohybu" + }, + "CooldownBlink": { + "text2": [ + "Blikáni při", + "chladnutí" + ], + "desc": "Blikat teplotou při chladnutí dokud je hrot horký" + }, + "TemperatureCalibration": { + "text2": [ + "Kalibrovat", + "teplotu?" + ], + "desc": "Začít kalibraci měření teploty hrotu" + }, + "SettingsReset": { + "text2": [ + "Obnovit tovární", + "nastavení?" + ], + "desc": "Obnovit všechna nastavení na výchozí" + }, + "VoltageCalibration": { + "text2": [ + "Kalibrovat", + "vstupní napětí?" + ], + "desc": "Začít kalibraci vstupního napětí (dlouhý stisk pro ukončení)" + }, + "AdvancedSoldering": { + "text2": [ + "Podrobná obr.", + "pájení" + ], + "desc": "Zobrazit detailní informace malým fontem na obrazovce pájení" + }, + "ScrollingSpeed": { + "text2": [ + "Rychlost", + "posouvání" + ], + "desc": "Rychlost posouvání popisků podobných tomuto (P=pomalu | R=rychle)" + }, + "QCMaxVoltage": { + "text2": [ + "Napětí", + "QC" + ], + "desc": "Maximální napětí QC pro jednání páječkou" + }, + "PDNegTimeout": { + "text2": [ + "PD", + "timeout" + ], + "desc": "Maximální prodleva při jednání PD ve 100ms krocích pro kompatibilitu s některými QC nabíječkami" + }, + "PowerLimit": { + "text2": [ + "Omezení", + "Výkonu" + ], + "desc": "Maximální příkon páječky (W=watt)" + }, + "ReverseButtonTempChange": { + "text2": [ + "Prohodit", + "tl. +-?" + ], + "desc": "Prohodit tlačítka pro změnu teploty" + }, + "TempChangeShortStep": { + "text2": [ + "Krok teploty", + "krátký?" + ], + "desc": "Velikost přídavku při změně teploty krátkým stiskem tlačítka" + }, + "TempChangeLongStep": { + "text2": [ + "Krok teploty", + "dlouhý?" + ], + "desc": "Velikost přídavku při změně teploty dlouhým stiskem tlačítka" + }, + "PowerPulsePower": { + "text2": [ + "Napájecí", + "pulz" + ], + "desc": "Intenzita výkonu pulzu pro udržení páječky vzhůru (watt)" + }, + "HallEffSensitivity": { + "text2": [ + "Citlivost", + "Hall. čidla" + ], + "desc": "Citlivost Hallova čidla pro detekci spánku (0=vypnuto | 1=nejméně citlivé | ... | 9=nejvíce citlivé)" + }, + "LockingMode": { + "text2": [ + "Povolit zamč.", + "tlačítek" + ], + "desc": "Při pájení podržte obě tlačítka pro jejich zamčení (Z=zakázáno | B=pouze v režimu boost | U=úplné zamčení)" + }, + "MinVolCell": { + "text2": [ + "Minimální", + "napětí" + ], + "desc": "Minimální dovolené napětí po článku (3S: 3 - 3,7V | 4-6S: 2,4 - 3,7V)" + }, + "AnimLoop": { + "text2": [ + "Anim.", + "smyčka" + ], + "desc": "Animovat ikony hlavního menu ve smyčce" + }, + "AnimSpeed": { + "text2": [ + "Anim.", + "rychlost" + ], + "desc": "Tempo animace ikon v menu (O=vypnuto | P=pomalu | S=středně | R=rychle)" + }, + "PowerPulseWait": { + "text2": [ + "Prodleva", + "napáj. pulzu" + ], + "desc": "Prodleva než je spuštěn pulz pro udržení páječky vzhůru pulzu pro udržení páječky vzhůru (x 2,5s)" + }, + "PowerPulseDuration": { + "text2": [ + "Délka", + "napáj. pulzu" + ], + "desc": "Délka pulzu pro udržení páječky vzhůru (x 250ms)" + }, + "LanguageSwitch": { + "text2": [ + "Jazyk:", + " CS Český" + ], + "desc": "Současný jazyk firmwaru" + }, + "Brightness": { + "text2": [ + "Jas", + "obrazovky" + ], + "desc": "Upravit jas OLED" + }, + "ColourInversion": { + "text2": [ + "Invertovat", + "obrazovku" + ], + "desc": "Invertovat barvy na OLED" + }, + "LOGOTime": { + "text2": [ + "Trvání", + "boot loga" + ], + "desc": "Nastavení doby trvání boot loga (s=sekundy)" + } + } +} \ No newline at end of file diff --git a/source/Core/BSP/Miniware/Pins.h b/source/Core/BSP/Miniware/Pins.h index 079c9049..fd89dea3 100644 --- a/source/Core/BSP/Miniware/Pins.h +++ b/source/Core/BSP/Miniware/Pins.h @@ -6,119 +6,87 @@ */ #ifndef BSP_MINIWARE_PINS_H_ -#define BSP_MINIWARE_PINS_H_ -#include "configuration.h" + #define BSP_MINIWARE_PINS_H_ + #include "configuration.h" -#ifdef MODEL_TS100 + #ifdef MODEL_TS100 -#define KEY_B_Pin GPIO_PIN_6 -#define KEY_B_GPIO_Port GPIOA -#define TMP36_INPUT_Pin GPIO_PIN_7 -#define TMP36_INPUT_GPIO_Port GPIOA -#define TMP36_ADC1_CHANNEL ADC_CHANNEL_7 -#define TMP36_ADC2_CHANNEL ADC_CHANNEL_7 -#define TIP_TEMP_Pin GPIO_PIN_0 -#define TIP_TEMP_GPIO_Port GPIOB -#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_8 -#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_8 -#define VIN_Pin GPIO_PIN_1 -#define VIN_GPIO_Port GPIOB -#define VIN_ADC1_CHANNEL ADC_CHANNEL_9 -#define VIN_ADC2_CHANNEL ADC_CHANNEL_9 -#define OLED_RESET_Pin GPIO_PIN_8 -#define OLED_RESET_GPIO_Port GPIOA -#define KEY_A_Pin GPIO_PIN_9 -#define KEY_A_GPIO_Port GPIOA -#define INT_Orientation_Pin GPIO_PIN_3 -#define INT_Orientation_GPIO_Port GPIOB -#define PWM_Out_Pin GPIO_PIN_4 -#define PWM_Out_GPIO_Port GPIOB -#define PWM_Out_CHANNEL TIM_CHANNEL_1 -#define PWM_Out_CCR -#define INT_Movement_Pin GPIO_PIN_5 -#define INT_Movement_GPIO_Port GPIOB -#define SCL_Pin GPIO_PIN_6 -#define SCL_GPIO_Port GPIOB -#define SDA_Pin GPIO_PIN_7 -#define SDA_GPIO_Port GPIOB -#endif -#ifdef MODEL_TS80 -// TS80 pin map -#define KEY_B_Pin GPIO_PIN_0 -#define KEY_B_GPIO_Port GPIOB -#define TMP36_INPUT_Pin GPIO_PIN_4 -#define TMP36_INPUT_GPIO_Port GPIOA -#define TMP36_ADC1_CHANNEL ADC_CHANNEL_4 -#define TMP36_ADC2_CHANNEL ADC_CHANNEL_4 -#define TIP_TEMP_Pin GPIO_PIN_3 -#define TIP_TEMP_GPIO_Port GPIOA -#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_3 -#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_3 + #define KEY_B_Pin GPIO_PIN_6 + #define KEY_B_GPIO_Port GPIOA + #define TMP36_INPUT_Pin GPIO_PIN_7 + #define TMP36_INPUT_GPIO_Port GPIOA + #define TMP36_ADC1_CHANNEL ADC_CHANNEL_7 + #define TMP36_ADC2_CHANNEL ADC_CHANNEL_7 + #define TIP_TEMP_Pin GPIO_PIN_0 + #define TIP_TEMP_GPIO_Port GPIOB + #define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_8 + #define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_8 + #define VIN_Pin GPIO_PIN_1 + #define VIN_GPIO_Port GPIOB + #define VIN_ADC1_CHANNEL ADC_CHANNEL_9 + #define VIN_ADC2_CHANNEL ADC_CHANNEL_9 + #define OLED_RESET_Pin GPIO_PIN_8 + #define OLED_RESET_GPIO_Port GPIOA + #define KEY_A_Pin GPIO_PIN_9 + #define KEY_A_GPIO_Port GPIOA + #define INT_Orientation_Pin GPIO_PIN_3 + #define INT_Orientation_GPIO_Port GPIOB + #define PWM_Out_Pin GPIO_PIN_4 + #define PWM_Out_GPIO_Port GPIOB + #define PWM_Out_CHANNEL TIM_CHANNEL_1 + #define PWM_Out_CCR + #define INT_Movement_Pin GPIO_PIN_5 + #define INT_Movement_GPIO_Port GPIOB + #define SCL_Pin GPIO_PIN_6 + #define SCL_GPIO_Port GPIOB + #define SDA_Pin GPIO_PIN_7 + #define SDA_GPIO_Port GPIOB + #endif -#define VIN_Pin GPIO_PIN_2 -#define VIN_GPIO_Port GPIOA -#define VIN_ADC1_CHANNEL ADC_CHANNEL_2 -#define VIN_ADC2_CHANNEL ADC_CHANNEL_2 -#define OLED_RESET_Pin GPIO_PIN_15 -#define OLED_RESET_GPIO_Port GPIOA -#define KEY_A_Pin GPIO_PIN_1 -#define KEY_A_GPIO_Port GPIOB -#define INT_Orientation_Pin GPIO_PIN_4 -#define INT_Orientation_GPIO_Port GPIOB -#define PWM_Out_Pin GPIO_PIN_6 -#define PWM_Out_GPIO_Port GPIOA -#define PWM_Out_CHANNEL TIM_CHANNEL_1 -#define INT_Movement_Pin GPIO_PIN_5 -#define INT_Movement_GPIO_Port GPIOB -#define SCL_Pin GPIO_PIN_6 -#define SCL_GPIO_Port GPIOB -#define SDA_Pin GPIO_PIN_7 -#define SDA_GPIO_Port GPIOB -#define SCL2_Pin GPIO_PIN_5 -#define SCL2_GPIO_Port GPIOA -#define SDA2_Pin GPIO_PIN_1 -#define SDA2_GPIO_Port GPIOA + #if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0 + // TS80 & TS80P pin map + #define KEY_B_Pin GPIO_PIN_0 + #define KEY_B_GPIO_Port GPIOB + #define TMP36_INPUT_Pin GPIO_PIN_4 + #define TMP36_INPUT_GPIO_Port GPIOA + #define TMP36_ADC1_CHANNEL ADC_CHANNEL_4 + #define TMP36_ADC2_CHANNEL ADC_CHANNEL_4 + #define TIP_TEMP_Pin GPIO_PIN_3 + #define TIP_TEMP_GPIO_Port GPIOA + #define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_3 + #define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_3 -#endif -#ifdef MODEL_TS80P -// TS80P pin map -#define KEY_B_Pin GPIO_PIN_0 -#define KEY_B_GPIO_Port GPIOB -#define TMP36_INPUT_Pin GPIO_PIN_4 -#define TMP36_INPUT_GPIO_Port GPIOA -#define TMP36_ADC1_CHANNEL ADC_CHANNEL_4 -#define TMP36_ADC2_CHANNEL ADC_CHANNEL_4 -#define TIP_TEMP_Pin GPIO_PIN_3 -#define TIP_TEMP_GPIO_Port GPIOA -#define TIP_TEMP_ADC1_CHANNEL ADC_CHANNEL_3 -#define TIP_TEMP_ADC2_CHANNEL ADC_CHANNEL_3 + #define VIN_Pin GPIO_PIN_2 + #define VIN_GPIO_Port GPIOA + #define VIN_ADC1_CHANNEL ADC_CHANNEL_2 + #define VIN_ADC2_CHANNEL ADC_CHANNEL_2 + #define OLED_RESET_Pin GPIO_PIN_15 + #define OLED_RESET_GPIO_Port GPIOA + #define KEY_A_Pin GPIO_PIN_1 + #define KEY_A_GPIO_Port GPIOB + #define INT_Orientation_Pin GPIO_PIN_4 + #define INT_Orientation_GPIO_Port GPIOB + #define PWM_Out_Pin GPIO_PIN_6 + #define PWM_Out_GPIO_Port GPIOA + #define PWM_Out_CHANNEL TIM_CHANNEL_1 + #define INT_Movement_Pin GPIO_PIN_5 + #define INT_Movement_GPIO_Port GPIOB + #define SCL_Pin GPIO_PIN_6 + #define SCL_GPIO_Port GPIOB + #define SDA_Pin GPIO_PIN_7 + #define SDA_GPIO_Port GPIOB + #define SCL2_Pin GPIO_PIN_5 + #define SCL2_GPIO_Port GPIOA + #define SDA2_Pin GPIO_PIN_1 + #define SDA2_GPIO_Port GPIOA -#define VIN_Pin GPIO_PIN_2 -#define VIN_GPIO_Port GPIOA -#define VIN_ADC1_CHANNEL ADC_CHANNEL_2 -#define VIN_ADC2_CHANNEL ADC_CHANNEL_2 -#define OLED_RESET_Pin GPIO_PIN_15 -#define OLED_RESET_GPIO_Port GPIOA -#define KEY_A_Pin GPIO_PIN_1 -#define KEY_A_GPIO_Port GPIOB -#define INT_Orientation_Pin GPIO_PIN_4 -#define INT_Orientation_GPIO_Port GPIOB -#define PWM_Out_Pin GPIO_PIN_6 -#define PWM_Out_GPIO_Port GPIOA -#define PWM_Out_CHANNEL TIM_CHANNEL_1 -#define INT_Movement_Pin GPIO_PIN_5 -#define INT_Movement_GPIO_Port GPIOB -#define SCL_Pin GPIO_PIN_6 -#define SCL_GPIO_Port GPIOB -#define SDA_Pin GPIO_PIN_7 -#define SDA_GPIO_Port GPIOB -#define SCL2_Pin GPIO_PIN_5 -#define SCL2_GPIO_Port GPIOA -#define SDA2_Pin GPIO_PIN_1 -#define SDA2_GPIO_Port GPIOA -#define INT_PD_Pin GPIO_PIN_9 -#define INT_PD_GPIO_Port GPIOA + #endif -#endif + #ifdef MODEL_TS80P + // TS80P pin map + #define INT_PD_Pin GPIO_PIN_9 + #define INT_PD_GPIO_Port GPIOA + + #endif #endif /* BSP_MINIWARE_PINS_H_ */ diff --git a/source/Core/BSP/Miniware/Power.cpp b/source/Core/BSP/Miniware/Power.cpp index b72d984b..84772772 100644 --- a/source/Core/BSP/Miniware/Power.cpp +++ b/source/Core/BSP/Miniware/Power.cpp @@ -22,11 +22,7 @@ void power_check() { } bool getIsPoweredByDCIN() { -#ifdef MODEL_TS80 - return false; -#endif - -#ifdef MODEL_TS80P +#if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0 return false; #endif diff --git a/source/Core/Drivers/Font.h b/source/Core/Drivers/Font.h index 7c9cc247..d3fc1723 100644 --- a/source/Core/Drivers/Font.h +++ b/source/Core/Drivers/Font.h @@ -124,7 +124,7 @@ const uint8_t WarningBlock24[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x30, 0x0C, 0x02, 0xF1, 0xF1, 0xF1, 0x02, 0x0C, 0x30, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xB0, 0x8C, 0x83, 0x80, 0x80, 0x80, 0x80, 0xB3, 0xB3, 0xB3, 0x80, 0x80, 0x80, 0x80, 0x83, 0x8C, 0xB0, 0xC0, 0x00, 0x00}; -#if defined(MODEL_TS100) + defined(MODEL_Pinecil) >= 1 +#if defined(MODEL_TS100) + defined(MODEL_Pinecil) > 0 const uint8_t buttonA[] = { // width = 42 // height = 16 @@ -140,7 +140,7 @@ const uint8_t disconnectedTip[] = { 0x04, 0x31, 0x38, 0x1c, 0x0e, 0x04, 0x01, 0x03, 0x07, 0x0e, 0x1c, 0x39, 0x30, 0x01, 0x03, 0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x04, 0x09, 0x0f, 0x00}; #endif -#if defined(MODEL_TS80) + defined(MODEL_TS80P) >= 1 +#if defined(MODEL_TS80) + defined(MODEL_TS80P) > 0 const uint8_t buttonA[] = { // width = 42 // height = 16