Skip to content

Commit

Permalink
swdptap: squash! type correctness in seq_out_parity
Browse files Browse the repository at this point in the history
  • Loading branch information
ALTracer committed Dec 2, 2023
1 parent 8e7c19b commit 43d2465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platforms/common/swdptap.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,10 @@ static void swdptap_seq_out(const uint32_t tms_states, const size_t clock_cycles

static void swdptap_seq_out_parity(const uint32_t tms_states, const size_t clock_cycles)
{
const int parity = __builtin_popcount(tms_states);
const uint8_t parity = __builtin_popcount(tms_states) & 1U;
swdptap_seq_out(tms_states, clock_cycles);

gpio_set_val(SWDIO_PORT, SWDIO_PIN, parity & 1U);
gpio_set_val(SWDIO_PORT, SWDIO_PIN, parity);
if (target_clk_divider != UINT32_MAX)
platform_delay_busy(target_clk_divider);

Expand Down

0 comments on commit 43d2465

Please sign in to comment.