void App_ProbeInit (void) { #if (APP_CFG_PROBE_OS_PLUGIN_EN == DEF_ENABLED) OSProbe_Init(); OSProbe_SetCallback(App_ProbeCallback); OSProbe_SetDelay(50); #endif #if (APP_CFG_PROBE_COM_EN == DEF_ENABLED) APP_TRACE_INFO(("Initializing uC/Probe ... \n\r")); ProbeCom_Init(); /* Initialize the uC/Probe communications module */ #if (PROBE_COM_CFG_RS232_EN == DEF_ENABLED) ProbeRS232_Init(115200); ProbeRS232_RxIntEn(); #endif #if (PROBE_COM_CFG_TCPIP_EN == DEF_ENABLED) ProbeTCPIP_Init(); #endif #endif #if (APP_CFG_PROBE_DEMO_INTRO_EN == DEF_ENABLED) ProbeDemoIntro_Init(); #endif }
void AppProbeInit (void) { #if (uC_PROBE_OS_PLUGIN > 0) (void)Probe_Counts; #if (uC_PROBE_COM_MODULE > 0) && \ (PROBE_COM_STAT_EN > 0) (void)Probe_ComRxPktSpd; (void)Probe_ComTxPktSpd; (void)Probe_ComTxSymSpd; (void)Probe_ComTxSymByteSpd; #endif OSProbe_Init(); OSProbe_SetCallback(AppProbeCallback); OSProbe_SetDelay(50); #endif #if (uC_PROBE_COM_MODULE > 0) ProbeCom_Init(); /* Initialize the uC/Probe communications module */ #if (PROBE_COM_METHOD_RS232 > 0) ProbeRS232_Init(115200); ProbeRS232_RxIntEn(); #endif #if (PROBE_COM_METHOD_TCPIP > 0) ProbeTCPIP_Init(); #endif #endif }
int main() { int i; unsigned long sw_time_1, sw_time_2; //enable the temperature sensor temp_sensor_init(); //enable uCProbe communication ProbeCom_Init(); ProbeRS232_Init(0); ProbeRS232_RxIntEn(); // turn off the LEDS IOWR(LED_PIO_BASE,0,0xFF); printf("BeMicro SDK Lab1: \n"); printf("-----------------\n\n"); // Create the input data waveform printf("Creating buffer source data\n\n"); for(i = 0; i < DATA_BUFFER_SIZE; i++) { source_databuffer[i] = input_data[i%INPUT_LENGTH]; } // record the value of the high resolution time-stamp timer at the entry and exit points of the software filter if(alt_timestamp_start() < 0) { printf("Please add the high resolution timer to the timestamp timer setting in the syslib properties page.\n"); return 0; } printf("Software filter is operating (please be patient)\n"); sw_time_1 = alt_timestamp(); FIR_SW(source_databuffer, DATA_BUFFER_SIZE, sw_destination_databuffer, T, coefficients[0], coefficients[1], coefficients[2], coefficients[3], coefficients[4], coefficients[5], coefficients[6], coefficients[7], DIVIDER_ORDER); sw_time_2 = alt_timestamp(); printf("Software filter is done\n\n"); sw_proc_time = ((double)(sw_time_2-sw_time_1))/((double)alt_timestamp_freq()); printf("Software processing time was: %f seconds\n\n", sw_proc_time); printf("Processing time will also be reported by uC-Probe:\n"); return 1; }