<commit_before>/*
 * Copyright (C) 2014 Prashanth.Udumula
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

//#define USE_LED_TX_RX
 
#include "cRF24.h"
#include "spi.h"
#include "nRF24L01.h"
#include "led.h"
#include <util/delay.h>
#include <avr/interrupt.h>
#include <inttypes.h>

volatile uint8_t receivedFlag = 0;
volatile uint8_t transmittedFlag = 0;
volatile uint8_t rfBuffer[32];
volatile uint8_t *rfPtrBuffer = rfBuffer;

// handles the transmission of rfPacket
void rfTransmit(uint8_t* buff, uint8_t len)
{
    rfToStandbyOne();
    rfWritePayload(buff, len);
    rfSetToTransmitMode();
    CE_HIGH;
    _delay_us(10);
    CE_LOW;
	LED_ON;
}

// handles the reception of rfPacket and filling of the buffer<commit_msg>changed the location of the LED build switch<commit_after>/*
 * Copyright (C) 2014 Prashanth.Udumula
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
#include "cRF24.h"
#include "spi.h"
#include "nRF24L01.h"
#include "led.h"
#include <util/delay.h>
#include <avr/interrupt.h>
#include <inttypes.h>

// uncomment this if you want an led to blink on TX and RX
//#define USE_LED_TX_RX 

volatile uint8_t receivedFlag = 0;
volatile uint8_t transmittedFlag = 0;
volatile uint8_t rfBuffer[32];
volatile uint8_t *rfPtrBuffer = rfBuffer;

// handles the transmission of rfPacket
void rfTransmit(uint8_t* buff, uint8_t len)
{
    rfToStandbyOne();
    rfWritePayload(buff, len);
    rfSetToTransmitMode();
    CE_HIGH;
    _delay_us(10);
    CE_LOW;
	LED_ON;
}

// handles the reception of rfPacket and filling of the buffer
{'fraction_non_alphanumeric': 0.08505997818974918, 'fraction_numerical': 0.016721192293711377, 'mean_word_length': 4.012750455373406, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2151284', 'n_tokens_mistral': 892, 'n_tokens_neox': 847, 'n_words': 345}