From 208e9ef64b054f5062debb84be6d0a416e3e5491 Mon Sep 17 00:00:00 2001 From: Bryce Johnson Date: Mon, 17 Jun 2019 19:08:07 -0600 Subject: [PATCH] minimize whitespace changes --- Multiprotocol/Redpine_cc2500.ino | 80 ++++++++++++++++---------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/Multiprotocol/Redpine_cc2500.ino b/Multiprotocol/Redpine_cc2500.ino index 0783021..df18f9b 100644 --- a/Multiprotocol/Redpine_cc2500.ino +++ b/Multiprotocol/Redpine_cc2500.ino @@ -98,47 +98,47 @@ static void REDPINE_data_frame() { static uint16_t ReadREDPINE() { - if ( prev_option != option ) - { // Frequency adjust - CC2500_WriteReg(CC2500_0C_FSCTRL0, option); - prev_option = option ; - } - if(IS_BIND_IN_PROGRESS) - { - if(bind_counter == REDPINE_BIND) - REDPINE_init(0); - if(bind_counter == REDPINE_BIND/2) - REDPINE_init(1); - REDPINE_set_channel(49); + if ( prev_option != option ) + { // Frequency adjust + CC2500_WriteReg(CC2500_0C_FSCTRL0, option); + prev_option = option ; + } + if(IS_BIND_IN_PROGRESS) + { + if(bind_counter == REDPINE_BIND) + REDPINE_init(0); + if(bind_counter == REDPINE_BIND/2) + REDPINE_init(1); + REDPINE_set_channel(49); CC2500_SetTxRxMode(TX_EN); - CC2500_SetPower(); - CC2500_Strobe(CC2500_SFRX); - REDPINE_build_bind_packet(); - CC2500_Strobe(CC2500_SIDLE); - CC2500_WriteData(packet, REDPINE_PACKET_SIZE); - if(--bind_counter==0) - { - BIND_DONE; - REDPINE_init(sub_protocol); - } - return 9000; - } - else - { - CC2500_SetTxRxMode(TX_EN); - REDPINE_set_channel(hopping_frequency_no); - CC2500_SetPower(); - CC2500_Strobe(CC2500_SFRX); - REDPINE_data_frame(); - CC2500_Strobe(CC2500_SIDLE); - hopping_frequency_no = (hopping_frequency_no + 1) % 49; - CC2500_WriteData(packet, REDPINE_PACKET_SIZE); - if (sub_protocol==0) - return REDPINE_LOOPTIME_FAST*100; - else - return REDPINE_LOOPTIME_SLOW*1000; - } - return 1; + CC2500_SetPower(); + CC2500_Strobe(CC2500_SFRX); + REDPINE_build_bind_packet(); + CC2500_Strobe(CC2500_SIDLE); + CC2500_WriteData(packet, REDPINE_PACKET_SIZE); + if(--bind_counter==0) + { + BIND_DONE; + REDPINE_init(sub_protocol); + } + return 9000; + } + else + { + CC2500_SetTxRxMode(TX_EN); + REDPINE_set_channel(hopping_frequency_no); + CC2500_SetPower(); + CC2500_Strobe(CC2500_SFRX); + REDPINE_data_frame(); + CC2500_Strobe(CC2500_SIDLE); + hopping_frequency_no = (hopping_frequency_no + 1) % 49; + CC2500_WriteData(packet, REDPINE_PACKET_SIZE); + if (sub_protocol==0) + return REDPINE_LOOPTIME_FAST*100; + else + return REDPINE_LOOPTIME_SLOW*1000; + } + return 1; } // register, fast 250k, slow