mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update hardware.cpp
This commit is contained in:
@@ -187,19 +187,15 @@ void seekQC(int16_t Vx10, uint16_t divisor) {
|
|||||||
// No continuous mode, so QC2
|
// No continuous mode, so QC2
|
||||||
QCMode = 2;
|
QCMode = 2;
|
||||||
// Goto nearest
|
// Goto nearest
|
||||||
if (Vx10 > 10.5) {
|
if (Vx10 > 110) {
|
||||||
// request 12V
|
// request 12V
|
||||||
// D- = 0.6V, D+ = 0.6V
|
// D- = 0.6V, D+ = 0.6V
|
||||||
// Clamp PB3
|
// Clamp PB3
|
||||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);// pull down D+
|
QC_Seek12V();
|
||||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
|
||||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// request 9V
|
// request 9V
|
||||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
|
QC_Seek9V();
|
||||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
|
|
||||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user