1
0
forked from me/IronOS

Retiming all the PWM's

This commit is contained in:
Ben V. Brown
2021-09-14 21:48:37 +10:00
parent 159ae7a8e2
commit a57449ed0f
8 changed files with 71 additions and 102 deletions

View File

@@ -33,16 +33,13 @@ void BSPInit(void);
// Called to reset the hardware watchdog unit
void resetWatchdog();
// Accepts a output level of 0.. to use to control the tip output PWM
void setTipPWM(uint8_t pulse);
void setTipPWM(const uint8_t pulse, const bool shouldUseFastModePWM);
// Returns the Handle temp in C, X10
uint16_t getHandleTemperature(uint8_t sample);
// Returns the Tip temperature ADC reading in raw units
uint16_t getTipRawTemp(uint8_t refresh);
// Returns the main DC input voltage, using the adjustable divisor + sample flag
uint16_t getInputVoltageX10(uint16_t divisor, uint8_t sample);
// Switch to the most suitable PWM freq given the desired period;
// returns true if the switch was performed and totalPWM changed
bool tryBetterPWM(uint8_t pwm);
// Readers for the two buttons
// !! Returns 1 if held down, 0 if released