/* * ======== main ======== */ int main(void) { Task_Handle taskHandle; Task_Params taskParams; Error_Block eb; #ifdef TIVAWARE /* * This is a work-around for EMAC initialization issues found on * the TM4C129 devices. The bug number is: * SDOCM00107378: NDK examples for EK-TM4C1294XL do not work * * The following disables the flash pre-fetch. It is enable within the * EMAC driver (in the EMACSnow_NIMUInit() function). */ UInt32 ui32FlashConf; ui32FlashConf = HWREG(0x400FDFC8); ui32FlashConf &= ~(0x00020000); ui32FlashConf |= 0x00010000; HWREG(0x400FDFC8) = ui32FlashConf; #endif /* Call board init functions */ Board_initGeneral(); Board_initGPIO(); Board_initEMAC(); /* * CyaSSL library needs time() for validating certificates. * USER STEP: Set up the current time in seconds below. */ MYTIME_init(); MYTIME_settime(1408053541); System_printf("Starting the TCP Echo example\nSystem provider is set to " "SysMin. Halt the target to view any SysMin contents in" " ROV.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); /* * Create the Task that farms out incoming TCP connections. * arg0 will be the port that this task listens to. */ Task_Params_init(&taskParams); Error_init(&eb); taskParams.stackSize = 32768; taskParams.priority = 1; taskParams.arg0 = TCPPORT; taskHandle = Task_create((Task_FuncPtr) tcpHandler, &taskParams, &eb); if (taskHandle == NULL) { System_printf("main: Failed to create tcpHandler Task\n"); } /* Start BIOS */ BIOS_start(); return (0); }
int main(void) { /* Call board init functions */ uint32_t ui32SysClock; ui32SysClock = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ | SYSCTL_OSC_MAIN | SYSCTL_USE_PLL | SYSCTL_CFG_VCO_480), 120E6); Board_initGeneral(ui32SysClock); Board_initEMAC(); Board_initGPIO(); // Board_initI2C(); // Board_initSDSPI(); // Board_initSPI(); // Board_initUART(); // Board_initUSB(Board_USBDEVICE); // Board_initUSBMSCHFatFs(); // Board_initWatchdog(); // Board_initWiFi(); setup_ledcube(); Mailbox_Params mbox_Params; Error_Block eb; Error_init(&eb); _sem = Semaphore_create(0, NULL, &eb); if (_sem == NULL) { System_abort("Couldn't create semaphore"); } ledEvent = Event_create(NULL,&eb); Mailbox_Params_init(&mbox_Params); mbox_Params.readerEvent=ledEvent; mbox_Params.readerEventId=Event_Id_01; mbox_led = Mailbox_create(sizeof(struct ledMatrix),1, &mbox_Params, &eb); if(mbox_led == NULL){ // Do something with errorblock, in the real world System_abort("woho!"); } create_led_task((UArg) mbox_led); //netOpenHook((UArg) mbox_led); netOpenHook(mbox_led); System_printf("Starting the example\nSystem provider is set to SysMin. " "Halt the target to view any SysMin contents in ROV.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); /* Start BIOS */ BIOS_start(); return (0); }
/* * ======== main ======== */ int main(void) { /* Call board init functions */ Board_initGeneral(); Board_initGPIO(); Board_initEMAC(); /* Turn on user LED */ GPIO_write(Board_LED0, Board_LED_ON); System_printf("Starting the UDP Echo example\nSystem provider is set to " "SysMin. Halt the target to view any SysMin contents in" " ROV.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); /* Start BIOS */ BIOS_start(); return (0); }
/* * ======== main ======== */ int main(void) { /* Call board init functions */ Board_initGeneral(); Board_initGPIO(); Board_initEMAC(); /* CyaSSL library needs time() for validating certificates. */ //MYTIME_init(); //MYTIME_settime(CURRENTTIME); System_printf("Starting the SSH/TCP Echo example\nSystem provider is set " "to SysMin. Halt the target to view any SysMin contents in" " ROV.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); /* Start BIOS */ BIOS_start(); return (0); }
/* * ======== main ======== */ Int main(Void) { /*Task_Handle taskHandle; Task_Params taskParams; Error_Block eb;*/ short merge = 0; char *temp = (char *) &merge; Get_EvnString(); /// got enviroment form flash 0x80000 /* Call board init functions */ Board_initGeneral(); Board_initGPIO(); Board_initEMAC(); Board_initUART(); INIT_UART1_Printf(); System_printf("Starting the Array Mang\nSystem provider is set to " "SysMin. Halt the target and use ROV to view output.\n"); /* SysMin will only print to the console when you call flush or exit */ System_flush(); Log_info0("Create TCP task"); // Create TCP task Task_Handle TCP_taskHandle; Task_Params TCP_taskParams; Error_Block TCP_eb; Task_Params_init(&TCP_taskParams); Error_init(&TCP_eb); TCP_taskParams.stackSize = 10240; //8192; TCP_taskParams.priority = 2; TCP_taskHandle = Task_create((Task_FuncPtr) tcpHandler, &TCP_taskParams, &TCP_eb); if (TCP_taskHandle == NULL) { UARTprintf("main: Failed to create tcpHandler Task\n"); } TCP_Periodic_Link_time.Updata_Period[1] = G_ENVCONFIG.Pollingtime[0]; TCP_Periodic_Link_time.Updata_Period[0] = G_ENVCONFIG.Pollingtime[1]; *temp = TCP_Periodic_Link_time.Updata_Period[0]; *(temp + 1) = TCP_Periodic_Link_time.Updata_Period[1]; test_merge = merge; //UARTprintf((const char*)"\n\n\n\n----Array Pollingtime = %d----\n\n\n\n\n",merge); TCP_Periodic_Link_time.TCP_Link_Period[0] = 0x3c; // TCP LINK Period TCP_Periodic_Link_time.TCP_Link_Period[1] = 0x00; //Timer-periodic Clock_Params clockParams; Error_Block eb_timer; Error_init(&eb_timer); Clock_Params_init(&clockParams); clockParams.period = merge * Time_Tick; clockParams.startFlag = TRUE; Periodic_Handle = Clock_create(TimeTick_Periodic, First_Periodic_time, &clockParams, &eb_timer); if (Periodic_Handle == NULL) { System_abort("Clock create failed"); } //Timer-Time_Stamp Clock_Params_init(&clockParams); clockParams.period = TimeStamp_time; clockParams.startFlag = TRUE; AM_Timer_Handle = Clock_create(TimeTick_TimeStamp, 1, &clockParams, &eb_timer); if (AM_Timer_Handle == NULL) { System_abort("Clock create failed"); } /* Start BIOS */ BIOS_start(); return (0); }