/** * * Main function for switching the core to fullon and active and reading the Power * * Parameters: * @param argc - not used * @param argv - not used * * @return int */ int main( int argc, char *argv[] ) { int ret = 0; /* Blackfin setup function to configure processor */ ret = blackfin_setup(); //returns 0 if successful and -1 if failed if (ret) { printf("\r\n Blackfin Setup Failed"); return -1; } /* FPGA setup function to configure FPGA, make sure the FPGA configuration binary data is loaded in to SDRAM at "FPGA_DATA_START_ADDR" */ //ret = fpga_setup(); //returns 0 if successful and -1 if failed ret = fpga_programmer((unsigned char*) ebiu_fifo_top_bin, sizeof(ebiu_fifo_top_bin)); if (ret) { printf("\r\n FPGA Setup Failed"); return -1; } /** Call the power monitoring function */ handSensing(); return 0; }
/** * * Main function for audio playback * * Parameters: * * @return int */ int main(void) { int status = -1; /* Blackfin setup function to configure processor */ status = blackfin_setup(); //returns 0 if successful and -1 if failed if (status) { printf("\r\n Blackfin Setup Failed"); return -1; } /* FPGA setup function to configure FPGA, make sure the FPGA configuration binary data is loaded in to SDRAM at "FPGA_DATA_START_ADDR" */ status = fpga_setup(); //returns 0 if successful and -1 if failed if (status) { printf("\r\n FPGA Setup Failed"); return -1; } printf("[MAIN]: Starting Audio Player\n"); audioPlayer_init(&audioPlayer); audioPlayer_start(&audioPlayer); audioPlayer_run(&audioPlayer); }