1
0
forked from me/IronOS

Spawn PD earlier

This commit is contained in:
Ben V. Brown
2021-04-05 14:37:50 +10:00
parent fc08dc42fa
commit b3c3e4e384
7 changed files with 21 additions and 28 deletions

View File

@@ -9,6 +9,7 @@
#include "Settings.h"
#include "cmsis_os.h"
#include <MMA8652FC.hpp>
#include <fusbpd.h>
#include <main.hpp>
#include <power.hpp>
uint8_t DetectedAccelerometerVersion = 0;
@@ -61,7 +62,12 @@ int main(void) {
osThreadStaticDef(MOVTask, startMOVTask, osPriorityNormal, 0, MOVTaskStackSize, MOVTaskBuffer, &MOVTaskControlBlock);
MOVTaskHandle = osThreadCreate(osThread(MOVTask), NULL);
resetWatchdog();
#ifdef POW_PD
if (usb_pd_detect() == true) {
// Spawn all of the USB-C processors
fusb302_start_processing();
}
#endif
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */