This commit is contained in:
Ben V. Brown
2022-04-20 21:19:07 +10:00
parent 3a82210b73
commit 92f4e2060c
6 changed files with 2 additions and 16 deletions

View File

@@ -25,7 +25,6 @@ history<uint16_t, ADC_Filter_Smooth> ADC_Temp;
history<uint16_t, ADC_Filter_Smooth> ADC_Tip;
void adc_fifo_irq(void) {
MSG((char *)"ADC IRQ\r\n");
if (ADC_GetIntStatus(ADC_INT_FIFO_READY) == SET) {
// Read out all entries in the fifo
const uint8_t cnt = ADC_Get_FIFO_Count();
@@ -64,16 +63,9 @@ volatile uint8_t pendingPWM = 200;
volatile bool lastPeriodWasFast = false;
// Timer 0 is used to co-ordinate the ADC and the output PWM
void timer0_comp0_callback(void) {
MSG((char *)"Timer CMP0\r\n");
ADC_Start();
}
void timer0_comp1_callback(void) {
MSG((char *)"Timer CMP1\r\n");
PWM_Channel_Disable(PWM_Channel);
}
void timer0_comp0_callback(void) { ADC_Start(); }
void timer0_comp1_callback(void) { PWM_Channel_Disable(PWM_Channel); }
void timer0_comp2_callback(void) {
MSG((char *)"Timer CMP2\r\n");
// This occurs at timer rollover, so if we want to turn on the output PWM; we do so
if (PWMSafetyTimer) {
PWMSafetyTimer--;

View File

@@ -61,11 +61,9 @@ bool USBPowerDelivery::negotiationComplete() {
}
bool USBPowerDelivery::fusbPresent() {
if (detectionState == 0) {
MSG((char *)"FUSB Probe\r\n");
if (fusb.fusb_read_id()) {
detectionState = 1;
}
MSG((char *)"FUSB Probe - %d\r\n", detectionState);
}
return detectionState == 1;
}

View File

@@ -45,7 +45,6 @@ int main(void) {
setTipX10Watts(0); // force tip off
MSG((char *)"main\r\n");
resetWatchdog();
/* Create the thread(s) */

View File

@@ -118,7 +118,6 @@ inline void readAccelerometer(int16_t &tx, int16_t &ty, int16_t &tz, Orientation
}
}
void startMOVTask(void const *argument __unused) {
MSG((char *)"startMOVTask\r\n");
osDelay(TICKS_100MS / 5); // This is here as the BMA doesnt start up instantly and can wedge the I2C bus if probed too fast after boot
detectAccelerometerVersion();
osDelay(TICKS_100MS / 2); // wait ~50ms for setup of accel to finalise

View File

@@ -30,7 +30,6 @@ static int32_t getX10WattageLimits();
/* StartPIDTask function */
void startPIDTask(void const *argument __unused) {
MSG((char *)"startPIDTask\r\n");
/*
* We take the current tip temperature & evaluate the next step for the tip
* control PWM.

View File

@@ -25,7 +25,6 @@ void startPOWTask(void const *argument __unused) {
postRToSInit();
// 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
MSG((char *)"POW_PD\r\n");
#if POW_PD
USBPowerDelivery::start();
// Crank the handle at boot until we are stable and waiting for IRQ