void config(void) { AD1PCFG = 0xFFFF; //Disable JTAG port DDPCONbits.JTAGEN = 0; //Define inputs/outputs define_io(); //Config peripherals: setup_core_timer(); //setup_spi1(); //EtherCAT setup_spi2_3_4(); //Fingers //Init ADC Module // setup_adc(); // AD1CON1bits.SAMP = 1; //Start conversion }
void config(void) { //Define inputs/outputs define_io(); //Assignation des périphériques peripheral_pin_select(); //Config peripherals: setup_usart1(); //PC/GPS setup_usart2(); //Radio setup_timer1(); //10ms timebase setup_adc(); //ADC //Encoder interrupts: _INT0IF = 0; _INT1IF = 0; _INT0IE = 1; _INT1IE = 1; //Disable unwanted interrupts: _U1TXIE = 0; _U2TXIE = 0; _SPI1IE = 0; _SPI1IF = 0; _T3IE = 0; _T2IE = 0; _OC2IE = 0; _IC1IE = 0; _OC1IE = 0; _IC1IE = 0; _U1ERIE = 0; _U2ERIE = 0; _PMPIE = 0; #ifdef USE_GLCD //Init GLCD GLCD_Initalize(); GLCD_ClearScreen(); #endif }