<commit_before>// TODO: fix bug: USB power is only being detected once at the beginning and never detected again!

/* wireless_serial:
 *
 *
 * TODO: Support for USB CDC ACM control signals.
 * TODO: UART flow control.
 * TODO: Better radio protocol (see TODOs in radio_link.c).
 */

#include <cc2511_map.h>
#include <board.h>
#include <random.h>
#include <time.h>

#include <usb.h>
#include <usb_com.h>

#include <radio_com.h>
#include <radio_link.h>

#include <uart.h>

int32 CODE param_baud_rate = 9600;

void updateLeds()
{
    //usbShowStatusWithGreenLed();
	LED_GREEN(usbPowerPresent());

    if(vinPowerPresent()){ LED_YELLOW(1); }

    LED_RED(timeMs & 1);

    // Turn on the red LED if the radio is in the RX_OVERFLOW state.
    // There used to be several bugs in the radio libraries that would cause
    // the radio to go in to this state, but hopefully they are all fixed now.
    if (MARCSTATE == 0x11)
    {
        LED_RED(1);
    }
    else
    {
        LED_RED(0);
    }
}

void usbToRadioService()
{<commit_msg>Replaced a tab with spaces.<commit_after>// TODO: fix bug: USB power is only being detected once at the beginning and never detected again!

/* wireless_serial:
 *
 *
 * TODO: Support for USB CDC ACM control signals.
 * TODO: UART flow control.
 * TODO: Better radio protocol (see TODOs in radio_link.c).
 */

#include <cc2511_map.h>
#include <board.h>
#include <random.h>
#include <time.h>

#include <usb.h>
#include <usb_com.h>

#include <radio_com.h>
#include <radio_link.h>

#include <uart.h>

int32 CODE param_baud_rate = 9600;

void updateLeds()
{
    //usbShowStatusWithGreenLed();
    LED_GREEN(usbPowerPresent());

    if(vinPowerPresent()){ LED_YELLOW(1); }

    LED_RED(timeMs & 1);

    // Turn on the red LED if the radio is in the RX_OVERFLOW state.
    // There used to be several bugs in the radio libraries that would cause
    // the radio to go in to this state, but hopefully they are all fixed now.
    if (MARCSTATE == 0x11)
    {
        LED_RED(1);
    }
    else
    {
        LED_RED(0);
    }
}

void usbToRadioService()
{
{'fraction_non_alphanumeric': 0.11388755406054782, 'fraction_numerical': 0.016338298894762134, 'mean_word_length': 3.1391650099403576, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4539180', 'n_tokens_mistral': 751, 'n_tokens_neox': 713, 'n_words': 240}