aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBen V. Brown <[email protected]>2019-12-31 22:46:23 +1100
committerBen V. Brown <[email protected]>2019-12-31 22:46:23 +1100
commit6b7567257ba3304f1f95d84e436e57e4df0c232f (patch)
tree5292bde3e31aadb81de9c9ff27a7964d71c7b05c
parent554001a2d4c761bffc3d68b3bb63ab63cbb46218 (diff)
downloadIronOS-6b7567257ba3304f1f95d84e436e57e4df0c232f.tar.gz
IronOS-6b7567257ba3304f1f95d84e436e57e4df0c232f.zip
Update hardware.cpp
-rw-r--r--workspace/TS100/Core/Src/hardware.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/workspace/TS100/Core/Src/hardware.cpp b/workspace/TS100/Core/Src/hardware.cpp
index c0ec3756..0dfcdec9 100644
--- a/workspace/TS100/Core/Src/hardware.cpp
+++ b/workspace/TS100/Core/Src/hardware.cpp
@@ -187,19 +187,15 @@ void seekQC(int16_t Vx10, uint16_t divisor) {
// No continuous mode, so QC2
QCMode = 2;
// Goto nearest
- if (Vx10 > 10.5) {
+ if (Vx10 > 110) {
// request 12V
// D- = 0.6V, D+ = 0.6V
// Clamp PB3
- HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_RESET);// pull down D+
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
+ QC_Seek12V();
} else {
// request 9V
- HAL_GPIO_WritePin(GPIOB, GPIO_PIN_3, GPIO_PIN_SET);
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_10, GPIO_PIN_SET);
- HAL_GPIO_WritePin(GPIOA, GPIO_PIN_8, GPIO_PIN_RESET);
+ QC_Seek9V();
}
}
#endif