<commit_before>/* 
 * File:   Main.c
 * Author: Philipp
 *
 * Created on December 29, 2015, 11:35 PM
 */

#include <stdio.h>
#include <stdlib.h>
#include "config.h"

void init_OSC();

/*
 * 
 */
int main(int argc, char** argv) {
    
    init_OSC();
    
    return (EXIT_SUCCESS);
}

void init_OSC() {

    //Clock Frequency 8mhz
    OSCCONbits.IRCF = 0b1110;
    //Multiply clock by 4 to yield 32
    OSCCONbits.SPLLEN = 0b1;
    //Clock determined by oscillator config fuses
    OSCCONbits.SCS = 0b00;

}
<commit_msg>Created Initial Programm Structure for INTERFACE Chip<commit_after>/* 
 * File:   Main.c
 * Author: Philipp
 *
 * Created on December 29, 2015, 11:35 PM
 */

#include <stdio.h>
#include <stdlib.h>
#include "config.h"

//INIT
void init_OSC();
void init_INT();
void init_I2C();

//OPERATION
void handshake();
void read_data();
void output(int value);
void reset_mux();
void timeout();

//Servo Values
int Serv1 = 0;
int Serv2 = 0;
int Serv3 = 0;
int Serv4 = 0;
int Serv5 = 0;
int Serv6 = 0;


/*
 *  
 */
int main(int argc, char** argv) {

    init_OSC();
    init_INT();
    init_I2C();
    
    handshake();
    
    while(1){
        read_data();
        output(Serv1);
        output(Serv2);
        output(Serv3);
        output(Serv4);
        output(Serv5);
        output(Serv6);
        reset_mux();
        timeout();
    }
    
    return (EXIT_SUCCESS);
}

void init_OSC() {

    //Clock Frequency 8mhz
    OSCCONbits.IRCF = 0b1110;
    //Multiply clock by 4 to yield 32
    OSCCONbits.SPLLEN = 0b1;
    //Clock determined by oscillator config fuses
    OSCCONbits.SCS = 0b00;
}

void init_INT() {
    //Reset all Flags and disable all interrupts
    INTCONbits.TMR0IF = 0b0;
    INTCONbits.INTF = 0b0;
    INTCONbits.IOCIF = 0b0;
    PIE1 = 0b0;
    PIE2 = 0b0;
    PIR1 = 0b0;
    PIR1 = 0b0;
    
    //General Initialization
    INTCONbits.GIE = 0b1;
    INTCONbits.PEIE = 0b1;
    
    //Timer0
    
    //Timer1
    
}

void init_I2C(){
    //TODO
}

void output(int value){
    //TODO
}

void reset_mux(){
    //TODO
}

void timeout(){
    //TODO
}
{'fraction_non_alphanumeric': 0.13237410071942446, 'fraction_numerical': 0.045563549160671464, 'mean_word_length': 2.31637519872814, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1432868', 'n_tokens_mistral': 877, 'n_tokens_neox': 800, 'n_words': 204}