Add a wait mode for the M0.

In wait mode, the byte counter is advanced, but no SGPIO read/writes are
done. This mode is intended to be used for implementing timed operations.
This commit is contained in:
Martin Ling
2021-12-24 15:55:49 +00:00
parent 3618a5352f
commit cca7320fe4
3 changed files with 39 additions and 11 deletions

View File

@@ -378,7 +378,7 @@ int write_register(hackrf_device* device, uint8_t part,
}
static const char * mode_name(uint32_t mode) {
const char *mode_names[] = {"IDLE", "RX", "TX_START", "TX_RUN"};
const char *mode_names[] = {"IDLE", "WAIT", "RX", "TX_START", "TX_RUN"};
const uint32_t num_modes = sizeof(mode_names) / sizeof(mode_names[0]);
if (mode < num_modes)
return mode_names[mode];