<commit_before>
unsigned eth_in = input("eth_in");
unsigned audio_in = input("audio_in");
unsigned rs232_rx = input("rs232_rx");

unsigned eth_out = output("eth_out");
unsigned audio_out = output("audio_out");
unsigned frequency_out = output("frequency_out");
unsigned samples_out = output("samples_out");
unsigned rs232_tx = output("rs232_tx");

#include "ethernet.h"
#include "scan.h"
#include "print.h"

#define AUDIO_RANGE 1024
#define AUDIO_BIAS 512
#define AUDIO_MAX 511
#define AUDIO_MIN -512

#define SAMPLING_FREQUENCY 200.0e6
#define AVERAGE_SAMPLES 8192
#define AUDIO_SAMPLING_FREQUENCY SAMPLING_FREQUENCY/AVERAGE_SAMPLES

void output_audio(int sample){
    if(sample > AUDIO_MAX) sample = AUDIO_MAX;
    if(sample < AUDIO_MIN) sample = AUDIO_MIN;
    fputc(sample+AUDIO_BIAS, audio_out);
}
<commit_msg>Adjust frequency in application.c to match 800MHz sample rate<commit_after>
unsigned eth_in = input("eth_in");
unsigned audio_in = input("audio_in");
unsigned rs232_rx = input("rs232_rx");

unsigned eth_out = output("eth_out");
unsigned audio_out = output("audio_out");
unsigned frequency_out = output("frequency_out");
unsigned samples_out = output("samples_out");
unsigned rs232_tx = output("rs232_tx");

#include "ethernet.h"
#include "scan.h"
#include "print.h"

#define AUDIO_RANGE 1024
#define AUDIO_BIAS 512
#define AUDIO_MAX 511
#define AUDIO_MIN -512

#define SAMPLING_FREQUENCY 800.0e6
#define AVERAGE_SAMPLES 8192
#define AUDIO_SAMPLING_FREQUENCY SAMPLING_FREQUENCY/AVERAGE_SAMPLES

void output_audio(int sample){
    if(sample > AUDIO_MAX) sample = AUDIO_MAX;
    if(sample < AUDIO_MIN) sample = AUDIO_MIN;
    fputc(sample+AUDIO_BIAS, audio_out);
}

{'fraction_non_alphanumeric': 0.110381861575179, 'fraction_numerical': 0.042362768496420046, 'mean_word_length': 6.910377358490566, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1987361', 'n_tokens_mistral': 666, 'n_tokens_neox': 629, 'n_words': 138}