int main() { uint8_t *httpchar = 0; MAP_WDT_A_holdTimer(); UART_PC_init(); init_timer32_0(); SL_D_init(); UART_GSM_init(); while(1){ if(call_server_flag){ httpchar = request_to_server(); update_display(httpchar); call_server_flag = false; //reset flag init_timer32_0(); } } }
int main(void) { /* Stop Watchdog */ MAP_WDT_A_holdTimer(); SL_D_init(); /* Display Refresh */ // uint8_t cmdArr[3] = {0x24, 0x01, 0x00}; // SL_D_sendCmd(cmdArr, 3); // /* Reset Data Pointer */ // uint8_t cmdArr1[3] = {0x20, 0x0D, 0x00}; // SL_D_sendCmd(cmdArr1, 3); // // /* Upload Image Data */ // uint8_t cmdArr2[20] = {0x20, 0x01, 0x00, 0x10, //UploadImageData Cmd // 0x3A, 0x01, 0xE0, 0x03, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; //EPD File Header // uint8_t cmdArr2_1[180] = {0x20, 0x01, 0x00, 0xA0, //UploadImageData Cmd // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //EPD File Data // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // SL_D_sendCmd(cmdArr2, 20); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // SL_D_sendCmd(cmdArr2_1, 180); // // /* Display Refresh */ // uint8_t cmdArr3[3] = {0x24, 0x01, 0x00}; // SL_D_sendCmd(cmdArr3, 3); uint8_t cmdArr1[20] = {0x20, 0x01, 0x00, 0x10, 0x3A, 0x01, 0xE0, 0x03, 0x20, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; SL_D_sendCmd(cmdArr1, 20); uint8_t cmdArr2[64] = {0x20, 0x01, 0x00, 0x3C, 0xF0, 0x00, 0x5C, 0x55, 0xFA, 0x90, 0x5F, 0xCC, 0x22, 0x81, 0x7D, 0x3A, 0xE6, 0xEE, 0x11, 0x19, 0xEA, 0xA2, 0x51, 0x0F, 0xF0, 0x00, 0x5C, 0x55, 0xFA, 0x90, 0x5F, 0xCC, 0x22, 0x81, 0x7D, 0x3A, 0xE6, 0xEE, 0x11, 0x19, 0xEA, 0xA2, 0x51, 0x0F, 0xF0, 0x00, 0x5C, 0x55, 0xFA, 0x90, 0x5F, 0xCC, 0x22, 0x81, 0x7D, 0x3A, 0xE6, 0xEE, 0x11, 0x19, 0xEA, 0xA2, 0x51, 0x0F }; int i; for(i=0; i<800; i++) { SL_D_sendCmd(cmdArr2, 64); } uint8_t cmdArr3[3] = {0x24, 0x01, 0x00}; SL_D_sendCmd(cmdArr3, 3); while(1) { __no_operation(); } }