void init_screen(void) { fb = (void *)0xb8000; set_attr(CONS_BLACK, CONS_WHITE); clear_fb(); x = 0; y = 0; }
void camStop() { rsc_set_lcd_ch0(&dev, 0); clear_fb(&dev); recovery_lcd_init(&dev); flagexit = true; pthread_join(frame_threads, 0); handle_stdin(&dev, "stop"); uninit_viqe(); close_device_fb(&dev); close_device(&dev); fprintf(stdout, "will return Quit\n"); return; }
static int initcam() { // 1. Open Device (CAMERA, LCD, Etc..) !! int ret = 0; init_camera_data(&dev); ret = open_device(&dev, CAMERA_DEVICE_NAME); if(ret < 0) return -1; camif_get_dev_info(&dev); init_viqe(&dev); bak_lcd_init(&dev); rsc_init_lcd(&dev, 0); clear_fb(&dev); // 2. Creat Thread (Get-Frame) !! pthread_create(&frame_threads, NULL, handle_camera, (void *)&dev); DBug_printf("CAMERA Start Ready!!! \n"); dev.cam_mode = MODE_START; return 0; }
int write(const char *s, size_t length) { size_t written = 0; size_t i = 0; while (i < length) { if ((unsigned char)(s[i]) == CONS_ESCAPE) { switch (s[++i]) { case CONS_CLEAR: clear_fb(); i++; break; case CONS_COLOR: text_attr = s[++i]; i++; break; case CONS_SETY: y = s[++i]; i++; break; case CONS_SETX: x = s[++i]; i++; break; } continue; } putc(s[i++]); written++; } return (written); }