void draw_about_remote_ipod_widget (PzWidget *wid, ttk_surface srf) { // Draw the message int y = wid->y + 5; ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "Test"); y += ttk_text_height (ttk_textfont) + 1; ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "Test2"); y += ttk_text_height (ttk_textfont) + 1; if (check_kernel_module("tsb43aa82")) ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "tsb43aa82 loaded"); else ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "tsb43aa82 NOT loaded"); y += ttk_text_height (ttk_textfont) + 1; if (check_kernel_module("scsi_mod")) ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "scsi_mod loaded"); else ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "scsi_mod NOT loaded"); y += ttk_text_height (ttk_textfont) + 1; if (check_kernel_module("sd_mod")) ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "sd_mod loaded"); else ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "sd_mod NOT loaded"); y += ttk_text_height (ttk_textfont) + 1; if (check_kernel_module("sbp2")) ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "sbp2 loaded"); else ttk_text (srf, ttk_textfont, wid->x + 5, y, ttk_makecol (BLACK), "sbp2 NOT loaded"); y += ttk_text_height (ttk_textfont) + 1; y += 3; // Dividing line ttk_line (srf, wid->x + 5, y, wid->x + wid->w - 5, y, ttk_makecol (DKGREY)); y += 3; // The message #define MSG "Press a button to quit." ttk_text (srf, ttk_menufont, wid->x + (wid->w - ttk_text_width (ttk_menufont, MSG)) / 2, wid->y + wid->h - ttk_text_height (ttk_menufont) - 5, ttk_makecol (BLACK), MSG); }
int main() { printf("Kernel Modules:\n"); printf("spi_bcm2708\t"); if ( check_kernel_module("spi_bcm2708") > 0 ){ printf("OK\n"); } else { printf("Not loaded!\n"); } printf("i2c_bcm2708\t"); if ( check_kernel_module("i2c_bcm2708") > 0 ){ printf("OK\n"); } else { printf("Not loaded!\n"); } printf("spidev\t\t"); if ( check_kernel_module("spidev") > 0 ){ printf("OK\n"); } else { printf("Not loaded!\n"); } printf("i2c_dev\t\t"); if ( check_kernel_module("i2c_dev") > 0 ){ printf("OK\n"); } else { printf("Not loaded!\n"); } return 0; }