Improve BPSK with output polarity inversion
This commit is contained in:
parent
a228223799
commit
3f8b2846bd
1 changed files with 5 additions and 3 deletions
|
@ -839,19 +839,21 @@ static void command(const char *cmd)
|
||||||
rf_tx_start(n);
|
rf_tx_start(n);
|
||||||
puts("Transmitting, press ENTER to stop.");
|
puts("Transmitting, press ENTER to stop.");
|
||||||
|
|
||||||
|
bool phase = false;
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
int c = getchar_timeout_us(1000);
|
int c = getchar_timeout_us(1000);
|
||||||
|
|
||||||
if ('\r' == c) {
|
if ('\r' == c) {
|
||||||
break;
|
break;
|
||||||
} else if (' ' == c) {
|
} else if (' ' == c) {
|
||||||
pio_sm_exec(pio1, 1, pio_encode_nop());
|
phase = !phase;
|
||||||
pio_sm_exec(pio1, 1, pio_encode_nop());
|
gpio_set_outover(n, phase);
|
||||||
pio_sm_exec(pio1, 1, pio_encode_nop());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
rf_tx_stop();
|
rf_tx_stop();
|
||||||
|
gpio_set_outover(n, 0);
|
||||||
puts("Done.");
|
puts("Done.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue