Modulation repaired

tinySA
erikkaashoek 6 years ago
parent 6422f9c5ed
commit e1d24a2b98

@ -5,8 +5,8 @@
# Compiler options here. # Compiler options here.
ifeq ($(USE_OPT),) ifeq ($(USE_OPT),)
# USE_OPT = -O2 -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage USE_OPT = -O2 -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
USE_OPT = -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage # USE_OPT = -fno-inline-small-functions -ggdb -fomit-frame-pointer -falign-functions=16 --specs=nano.specs -fstack-usage
endif endif
# C specific options here (added to USE_OPT). # C specific options here (added to USE_OPT).

@ -761,7 +761,7 @@ static bool sweep(bool break_on_operation)
// back to toplevel to handle ui operation // back to toplevel to handle ui operation
if (operation_requested && break_on_operation) if (operation_requested && break_on_operation)
return false; return false;
if (MODE_OUTPUT(setting_mode)) { if (MODE_OUTPUT(setting_mode) && setting_modulation == MO_NONE) {
osalThreadSleepMilliseconds(10); osalThreadSleepMilliseconds(10);
} }
@ -1495,7 +1495,7 @@ void calibrate(void)
ili9341_drawstring_7x13("Calibration failed", 30, 120); ili9341_drawstring_7x13("Calibration failed", 30, 120);
goto quit; goto quit;
} else { } else {
SetPowerLevel(-23); SetPowerLevel(-22); // Should be -22.5dBm
chThdSleepMilliseconds(1000); chThdSleepMilliseconds(1000);
} }
} }

@ -406,25 +406,25 @@ void PE4302_shiftOut(uint8_t val)
SPI2_SDI_HIGH; SPI2_SDI_HIGH;
else else
SPI2_SDI_LOW; SPI2_SDI_LOW;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
SPI2_CLK_HIGH; SPI2_CLK_HIGH;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
SPI2_CLK_LOW; SPI2_CLK_LOW;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
} }
} }
void PE4302_Write_Byte(unsigned char DATA ) void PE4302_Write_Byte(unsigned char DATA )
{ {
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
SPI2_CLK_LOW; SPI2_CLK_LOW;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
PE4302_shiftOut(DATA); PE4302_shiftOut(DATA);
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
CS_PE_HIGH; CS_PE_HIGH;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
CS_PE_LOW; CS_PE_LOW;
chThdSleepMicroseconds(PE4302_DELAY); // chThdSleepMicroseconds(PE4302_DELAY);
} }

Loading…
Cancel
Save

Powered by TurnKey Linux.