Culling until fits in code
Does _not_ negotiate correctly :(
This commit is contained in:
@@ -9,23 +9,37 @@ void power_probe() {
|
||||
// If TS100 - noop
|
||||
#ifdef MODEL_TS80
|
||||
|
||||
startQC(systemSettings.voltageDiv);
|
||||
|
||||
startQC(systemSettings.voltageDiv);
|
||||
|
||||
seekQC((systemSettings.cutoutSetting) ? 120 : 90,
|
||||
systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
|
||||
seekQC((systemSettings.cutoutSetting) ? 120 : 90,
|
||||
systemSettings.voltageDiv); // this will move the QC output to the preferred voltage to start with
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
void power_check() {
|
||||
#ifdef MODEL_TS80
|
||||
QC_resync();
|
||||
QC_resync();
|
||||
if (FUSB302_present) {
|
||||
pd_run_state_machine();
|
||||
if (HAL_GPIO_ReadPin(GPIOA, GPIO_PIN_9) == GPIO_PIN_RESET) {
|
||||
tcpc_alert();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
uint8_t usb_pd_detect(){
|
||||
uint8_t usb_pd_detect() {
|
||||
#ifdef MODEL_TS80
|
||||
FUSB302_present=fusb302_detect();
|
||||
FUSB302_present = fusb302_detect();
|
||||
if (FUSB302_present) {
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_MEDIUM;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_9;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
}
|
||||
return FUSB302_present;
|
||||
#endif
|
||||
return false;
|
||||
|
||||
@@ -291,7 +291,7 @@ typedef struct
|
||||
/** @defgroup RCC_Flag Flags
|
||||
* Elements values convention: XXXYYYYYb
|
||||
* - YYYYY : Flag position in the register
|
||||
* - XXX : Register index
|
||||
* - X XX : Register index
|
||||
* - 001: CR register
|
||||
* - 010: BDCR register
|
||||
* - 011: CSR register
|
||||
|
||||
@@ -8,7 +8,14 @@
|
||||
#include "stdlib.h"
|
||||
#include "task.h"
|
||||
#include "I2C_Wrapper.hpp"
|
||||
#include "USBC_TCPM/tcpm.h"
|
||||
void postRToSInit() {
|
||||
// Any after RTos setup
|
||||
// Any after RTos setup
|
||||
FRToSI2C::FRToSInit();
|
||||
#ifdef MODEL_TS80
|
||||
tcpm_init();
|
||||
osDelay(50);
|
||||
pd_init();
|
||||
osDelay(50);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user