Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void testLCD(uint8_t stat, uint32_t oprt)
- {
- uint32_t i,j;
- char str1[30]={"bla"}, str2[50] = {"blu"}, str3[30];
- LCD_PIXEL foreground = {0, 255, 0, 0};
- LCD_PIXEL background = {0, 0, 0, 0};
- for (i = 0; i < LCD_HEIGHT; i++)
- {
- for (j = 0; j < LCD_WIDTH / 3; j++)
- {
- DRV_LCD_PutPixel(i, j, 255, 0, 0);
- }
- for (j = LCD_WIDTH / 3; j < 2 * (LCD_WIDTH / 3); j++)
- {
- DRV_LCD_PutPixel(i, j, 230, 220, 0);
- }
- for (j = 2 * (LCD_WIDTH / 3); j < LCD_WIDTH; j++)
- {
- DRV_LCD_PutPixel(i, j, 0, 0, 255);
- }
- }
- sprintf(str1, "RSSI value is: %d dBmW", rssi_value_dbmw);
- puts(str1);
- if (stat == 0) sprintf(str2, "Not registered and not searching");
- else if (stat == 1) sprintf(str2, "Home network");
- else if (stat == 2) sprintf(str2, "Not registered, searching for network");
- else if (stat == 3) sprintf(str2, "Registration denied");
- else if (stat == 4) sprintf(str2, "Uknown modem registration state");
- else if (stat == 5) sprintf(str2, "Roamning network");
- puts(str2);
- sprintf(str3, (const char *)oprt);
- puts(str3);
- DRV_LCD_Puts(str1, 20, 10, foreground, background, FALSE);
- DRV_LCD_Puts(str2, 20, 20, foreground, background, FALSE);
- DRV_LCD_Puts(str3, 20, 30, foreground, background, FALSE);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement