Ignore:
Timestamp:
Oct 7, 2015, 11:56:33 AM (9 years ago)
Author:
alain
Message:

Introduce the giet_fbf_size() and giet_fbf_alloc() system calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/applications/display/display.c

    r708 r712  
    1010
    1111#include <stdio.h>
     12#include <stdlib.h>
    1213#include <hard_config.h>     // To check Frame Buffer size
    1314
     
    3738    int             fd;
    3839    unsigned int    image = 0;
     40    char            byte;
     41    unsigned int    fbuf_x_size;
     42    unsigned int    fbuf_y_size;
    3943
    40     char            byte;
    41 
    42     // parameters checking
    43     if ( (NPIXELS != FBUF_X_SIZE) || (NLINES != FBUF_Y_SIZE) )
    44     {
    45         giet_pthread_exit("[DISPLAY ERROR] Frame buffer size does not fit image size");
    46     }
     44    // checking frame buffer size
     45    giet_fbf_size( &fbuf_x_size , &fbuf_y_size );
     46    giet_pthread_assert( ((NPIXELS == fbuf_x_size) && (NLINES == fbuf_y_size)),
     47                         "[DISPLAY ERROR] Frame buffer size does not fit image size");
    4748
    4849    // get a private TTY
     
    6263    giet_tty_printf("\n[DISPLAY] P[%d,%d,%d] open file %s at cycle %d\n",
    6364                    x, y, p, FILENAME, giet_proctime() );
     65
     66    // get Frame Buffer ownership
     67    giet_fbf_alloc();
    6468
    6569    // get a Chained Buffer DMA channel
Note: See TracChangeset for help on using the changeset viewer.