void userTask(void *param) { char_t buffer[40]; //Point to the network interface NetInterface *interface = &netInterface[0]; //Initialize LCD display lcdSetCursor(2, 0); printf("IPv4 Addr\r\n"); lcdSetCursor(5, 0); printf("Press user button\r\nto run test\r\n"); //Endless loop while(1) { //Display IPv4 host address lcdSetCursor(3, 0); printf("%-16s\r\n", ipv4AddrToString(interface->ipv4Config.addr, buffer)); //Up button pressed? //if(!(PIO_BT_UP->PIO_PDSR & BT_UP)) { //SSL client test routine sslClientTest(); //Wait for the up button to be released //while(!(PIO_BT_UP->PIO_PDSR & BT_UP)); } //Loop delay osDelayTask(5000); } }
void userTask(void *param) { //Endless loop while(1) { //SW1 button pressed? if(!(PORTD & SW1_MASK)) { //SSL client test routine sslClientTest(); //Wait for the SW1 button to be released while(!(PORTD & SW1_MASK)); } //Loop delay osDelayTask(100); } }