mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update POWThread.cpp
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include "QC3.h"
|
#include "QC3.h"
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#include "cmsis_os.h"
|
#include "cmsis_os.h"
|
||||||
|
#include "fusbpd.h"
|
||||||
#include "main.hpp"
|
#include "main.hpp"
|
||||||
#include "stdlib.h"
|
#include "stdlib.h"
|
||||||
#include "task.h"
|
#include "task.h"
|
||||||
@@ -17,7 +18,17 @@
|
|||||||
// Small worker thread to handle power (mostly QC) related steps
|
// Small worker thread to handle power (mostly QC) related steps
|
||||||
|
|
||||||
void startPOWTask(void const *argument __unused) {
|
void startPOWTask(void const *argument __unused) {
|
||||||
|
// You have to run this once we are willing to answer PD messages
|
||||||
|
// Setting up too early can mean that we miss the ~20ms window to respond on some chargers
|
||||||
|
#ifdef POW_PD
|
||||||
|
if (usb_pd_detect() == true) {
|
||||||
|
// Spawn all of the USB-C processors
|
||||||
|
fusb302_start_processing();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// Init any other misc sensors
|
||||||
postRToSInit();
|
postRToSInit();
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
power_check();
|
power_check();
|
||||||
osDelay(TICKS_100MS); // Slow down update rate
|
osDelay(TICKS_100MS); // Slow down update rate
|
||||||
|
|||||||
Reference in New Issue
Block a user