Setup template
This commit is contained in:
@@ -14,7 +14,7 @@ const uint16_t powerPWM = 255;
|
||||
const uint8_t holdoffTicks = 10;
|
||||
const uint8_t tempMeasureTicks = 14;
|
||||
|
||||
uint16_t totalPWM; // Total length of the cycle's ticks
|
||||
uint16_t totalPWM = 255; // Total length of the cycle's ticks
|
||||
|
||||
void resetWatchdog() {
|
||||
//#TODO
|
||||
@@ -89,7 +89,7 @@ void reboot() {
|
||||
|
||||
void delay_ms(uint16_t count) {
|
||||
// delay_1ms(count);
|
||||
//#TODO
|
||||
BL702_Delay_MS(count);
|
||||
}
|
||||
|
||||
uint32_t __get_IPSR(void) {
|
||||
|
||||
@@ -27,7 +27,7 @@ void ADC0_1_IRQHandler(void) {
|
||||
// static void switchToFastPWM(void);
|
||||
|
||||
// volatile uint16_t PWMSafetyTimer = 0;
|
||||
// volatile uint8_t pendingPWM = 0;
|
||||
volatile uint8_t pendingPWM = 200;
|
||||
// void TIMER1_IRQHandler(void) {
|
||||
// static bool lastPeriodWasFast = false;
|
||||
|
||||
|
||||
@@ -22,11 +22,9 @@ uint16_t ADCReadings[ADC_NORM_SAMPLES]; // room for 32 lots of the pair of readi
|
||||
// Functions
|
||||
|
||||
void hardware_init() {
|
||||
// #TODO
|
||||
gpio_set_mode(OLED_RESET_Pin, GPIO_OUTPUT_MODE);
|
||||
gpio_set_mode(KEY_A_Pin, GPIO_INPUT_PD_MODE);
|
||||
gpio_set_mode(KEY_B_Pin, GPIO_INPUT_PD_MODE);
|
||||
I2C_SetPrd(I2C0_ID, 15);
|
||||
// gpio_set_mode(KEY_A_Pin, GPIO_INPUT_PD_MODE);
|
||||
// gpio_set_mode(KEY_B_Pin, GPIO_INPUT_PD_MODE);
|
||||
}
|
||||
|
||||
uint16_t getADCHandleTemp(uint8_t sample) {
|
||||
|
||||
@@ -133,8 +133,8 @@
|
||||
#define MIN_BOOST_TEMP_C 250 // The min settable temp for boost mode °C
|
||||
#define MIN_BOOST_TEMP_F 480 // The min settable temp for boost mode °F
|
||||
|
||||
#define POW_PD 1
|
||||
#define POW_QC 1
|
||||
#define POW_PD 0
|
||||
#define POW_QC 0
|
||||
#define POW_DC 1
|
||||
#define POW_QC_20V 1
|
||||
#define ENABLE_QC2 1
|
||||
|
||||
Reference in New Issue
Block a user