示例#1
0
文件: start.c 项目: bengras/umon
/* init2():
 */
void
init2(void)
{
#if INCLUDE_FLASH | INCLUDE_TFS
    int rc = 0;
#endif

#if INCLUDE_FBI
    if(StateOfMonitor == INITIALIZE) {
        fbdev_init();    /* Initialize the frame-buffer device */
    }
#endif

#if INCLUDE_FLASH
    if(StateOfMonitor == INITIALIZE) {
        rc = FlashInit();    /* Init flashop data structures and (possibly) */
    }
    /* the relocatable functions.  This MUST be */
#endif                      /* done prior to turning on cache!!! */

    cacheInit();        /* Initialize cache. */

#if INCLUDE_ETHERNET
    enreset();          /* Clear the ethernet interface. */
#endif

#if INCLUDE_TFS
    if(rc != -1) {      /* Start up TFS as long as flash */
        tfsstartup();    /* initialization didn't fail. */
    }
#endif
}
示例#2
0
g_error yuv16_422_planar_init(void) {
  g_error e;

  /* Call parent function */
  /* NOTE : The fbdev_init() function includes some specific settings
   * for yuv16_422_planar mode. See CONFIG_FB_YUV16_422_PLANAR in this.
   */
  e = fbdev_init();
  errorcheck;
   
  /* Init our own stuff */
  /* Create an RGB shadow buffer */
  yuv16_rgb_shadow_buffer = malloc(vid->xres * vid->yres * sizeof(hwrcolor));
  if (yuv16_rgb_shadow_buffer == 0) {
    yuv16_422_planar_close();
    return mkerror(PG_ERRT_MEMORY, 25); /* No mem for RGB shadow buffer */
  }
  
  return success;
}