Changes between Version 128 and Version 129 of library_stdio


Ignore:
Timestamp:
Oct 18, 2015, 5:47:54 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v128 v129  
    410410
    411411 === 2) void '''giet_fbf_alloc'''() ===
    412 This blocking function allows the calling thread to get exclusive ownership of the shared FBF peripheral. It returns only when the lock has been taken.
     412This blocking function allows the calling thread to get exclusive ownership of the shared FBF peripheral.
     413It returns only when the lock has been taken.
    413414All theads in the same space as the calling thread can access concurrently the frame buffer, under the user responsibility.
    414415This lock is released when the thread completes execution, after a giet_pthread_exit(), or a giet_pthread_kill().
    415416
    416  === 3) void '''giet_fbf_cma_alloc'''()
    417 This function allocates a private CMA channel  to the calling thread, and registers the channel index
    418 in the thread context.
    419 The threadthread exit if no CMA channel available
    420 
    421  === 4) void '''giet_fbf_cma_init_buf'''( void* buf0_vbase , void* buf1_vbase , void* sts0_vaddr , void* sts1_vaddr ) ===
    422 This function initializes the chained buffer descriptors for the two source buffers and the frame buffer.
    423 The buf0 and buf1 user buffers must be large enough to store a complete image, and must be aligned on a 64 bytes boundary.
    424 The sts0 and sts1 user buffers contain just a Boolean, but they must be large enough to store 64 bytes, and must be aligned on a 64 bytes boundary.
    425  * '''buf0_vbase''' : virtual address of the first data buffer.
    426  * '''buf1_vbase''' : virtual address of  the second  data buffer,
    427  * '''sts0_vaddr''' : virtual address of the first buffer status.
    428  * '''sts1_vaddr''' : virtual address of the second buffer status.
    429 
    430  === 5) void '''giet_fbf_cma_start'''( unsigned int length ) ===
    431 This function activates the transfer of a stream of images from two user buffers to the frame buffer. It must be used in conjunction with the giet_fbf_cma_display() function. The chained buffer descriptors should have been initialized by the giet_fbf_cma_init_buf() function.
    432  * '''length''' is the size of the image (bytes).
    433 
    434  === 6) void '''giet_fbf_cma_display'''( unsigned int buffer ) ===
    435 This function enables the transfer of the specified buffer.
    436  * '''buffer''' is the buffer index (0 or 1).
     417 === 3) void '''giet_fbf_cma_alloc'''( unsigned int nbufs )
     418This function allocates a private CMA channel  to the calling thread, and registers the channel index in the thread context.
     419The <nbufs> argument define the total number of chained user buffers.
     420As each user buffer contains one image, the buffer size must be FBUF_X_SIZE * FBUF_Y_SIZE.
     421The user buffers can be distributed (one buffer per cluster) or not (all buffers in same cluster).
     422This function initializes the chained buffer descriptor for the frame buffer (one single buffer).
     423The thread exit if no CMA channel available.
     424
     425 === 4) void '''giet_fbf_cma_init_buf'''( unsigned int index  void* buf_vaddr , void* sts_vaddr ) ===
     426This function initializes the chained buffer descriptor for one user buffer identified by the <index> argument.
     427This <index> argument must be smaller than the <nbufs> argument in giet_fbf_cma_alloc() above.
     428The set of user buffers will be transferred by the CMA peripheral in the order of increasing indexes.
     429This function must be called <nbufs> times, to initialize the <nbufs> chained buffers descriptors.
     430Each user buffer must be large enough to store a complete image, and must be aligned on a 64 bytes boundary.
     431The buffer status contain just a Boolean, but it must occupy 64 bytes, and must be aligned on a 64 bytes boundary.
     432For a given user buffer, the buffer and the associated status must be in the same cluster.
     433 * '''index''' : buffer index
     434 * '''buf_vaddr''' : virtual address of the user buffer.
     435 * '''sts_vaddr''' : virtual address of the buffer status.
     436The thread exit if buffers are not aligned, index too large, or buffer and status in different clusters. 
     437
     438 === 5) void '''giet_fbf_cma_start'''() ===
     439This function activates the transfer of a stream of images from a set of chained user buffers to the frame buffer. It must be used in conjunction with the giet_fbf_cma_display() function. The chained buffer descriptors should have been initialized by the giet_fbf_cma_init_buf() function.
     440
     441 === 6) void '''giet_fbf_cma_display'''( unsigned int index ) ===
     442This function enables the transfer of the buffer identified by the <index> argument.
     443For each user buffer, the buffer status must be used as a SET/RESET synchronisation flip-flop, that is set by the application
     444and reset by the CMA peripheral. 
    437445
    438446 === 7) void '''giet_fbf_cma_stop'''( ) ===