Add an idle mode for the M0.

In the idle mode, the M0 simply waits for a different mode to be set.
No SGPIO access is done.

One extra cycle is added to both TX code paths, to check whether the
M0 should return to the idle loop based on the mode setting. The RX
paths are unaffected as the branch to RX is handled first.
This commit is contained in:
Martin Ling
2021-12-24 08:27:34 +00:00
parent 5b50b2dfac
commit 32c725dd61
3 changed files with 18 additions and 8 deletions

View File

@@ -378,7 +378,7 @@ int write_register(hackrf_device* device, uint8_t part,
}
static void print_state(hackrf_m0_state *state) {
const char *mode_names[] = {"RX", "TX"};
const char *mode_names[] = {"IDLE", "RX", "TX"};
const uint32_t num_modes = sizeof(mode_names) / sizeof(mode_names[0]);
printf("M0 state:\n");
printf("Mode: %u (%s)\n",