Ignore:
Timestamp:
Nov 20, 2020, 12:11:35 AM (4 years ago)
Author:
alain
Message:

Introduce chat application to test the named pipes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/user/display/display.c

    r657 r676  
    44//  author : Alain Greiner
    55///////////////////////////////////////////////////////////////////////////////////////
    6 //  This file describes the single thread "display" application.
    7 //  It uses the external chained buffer DMA to display a stream
    8 //  of images on the frame buffer. 
     6//  This file describes the single thread "display" application that simply
     7//  open a file containing a raw image stored on disk, ans distplay it on the
     8//  Frame Buffer without using the ALMOS-MKH windows manager.
    99///////////////////////////////////////////////////////////////////////////////////////
    1010
     
    1515#include <almosmkh.h>
    1616
    17 #define PATH_MAX_LENGHT    128
     17#define PATH_NAME   "misc/images_128.ram"
    1818
    1919#define FBF_TYPE    420         
     
    8080    }
    8181
     82    // check pixel encoding type
    8283    if( fbf_type != FBF_TYPE )
    8384    {
     
    8788    }
    8889
    89     // get pathname for input file
    90     while( 1 )
    91     {
    92         printf("\n[display] path = ");
    93 
    94         error = get_string( pathname , PATH_MAX_LENGHT );
    95 
    96         if ( error )  printf("\n[display error] cannot get path for input file\n" );
    97         else  break;
    98     }
    99 
    10090    // open file
    101     int fd = open( pathname , O_RDONLY , 0 );
    102 
     91    int fd = open( PATH_NAME , O_RDONLY , 0 );
    10392    if( fd < 0 )
    10493    {
Note: See TracChangeset for help on using the changeset viewer.