From 9824a723b779981e3c5ddd320627e1fcb0741770 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Fri, 12 Oct 2012 09:45:18 -0700 Subject: [PATCH] Moved invariant in sgpio_configure() loop out of loop. Originally, so I could use the value to calculate another invariant. --- firmware/common/sgpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firmware/common/sgpio.c b/firmware/common/sgpio.c index 451e9c52..d53c3f87 100644 --- a/firmware/common/sgpio.c +++ b/firmware/common/sgpio.c @@ -157,6 +157,7 @@ void sgpio_configure( SGPIO_SLICE_L, }; + const uint_fast8_t pos = multi_slice ? 0x1f : 0x03; const bool single_slice = !multi_slice; const uint_fast8_t slice_count = multi_slice ? 8 : 1; @@ -166,7 +167,6 @@ void sgpio_configure( const bool input_slice = (i == 0) && (transceiver_mode == TRANSCEIVER_MODE_RX); const uint_fast8_t concat_order = (input_slice || single_slice) ? 0 : 3; const uint_fast8_t concat_enable = (input_slice || single_slice) ? 0 : 1; - const uint_fast8_t pos = multi_slice ? 0x1f : 0x03; SGPIO_MUX_CFG(slice_index) = SGPIO_MUX_CFG_CONCAT_ORDER(concat_order)