Changes between Version 126 and Version 127 of library_stdio


Ignore:
Timestamp:
Oct 6, 2015, 11:41:10 AM (9 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v126 v127  
    403403 == __Frame Buffer related system calls__ ==
    404404
    405 To display images, an user thread can access the frame buffer through a memcpy() or through the ''Chained Buffer DMA'' controller (called CMA).
    406 The four first functions use a private CMA channel that is registered in the thread context. The Two last functions use a memcpy().
    407 
    408  === 1) void '''giet_fbf_cma_alloc'''()
     405To display images, an user application must get the frame buffer ownership, and check the frame buffer size (width and height).
     406Then, it can access the frame buffer through a (software) memcpy() or through the (hardware) ''Chained Buffer DMA'' controller (called CMA).
     407
     408 === 1) void '''giet_fbf_size'''( unsigned int* width , unsigned int* height) ===
     409This function returns in the <width> and <height> arguments the number of pixels per line, and the number of lines of the frame buffer
     410
     411 === 2) void '''giet_fbf_alloc'''() ===
     412This blocking function allows the calling thread to get exclusive ownership of the shared FBF peripheral. It returns only when the lock has been taken.
     413This lock is released when the thread completes execution, after a giet_pthread_exit(), or a get_pthread_kill().
     414
     415 === 3) void '''giet_fbf_cma_alloc'''()
    409416This function allocates a private CMA channel  to the calling thread, and registers the channel index
    410417in the thread context.
    411418The threadthread exit if no CMA channel available
    412419
    413  === 2) void '''giet_fbf_cma_init_buf'''( void* buf0_vbase , void* buf1_vbase , void* sts0_vaddr , void* sts1_vaddr ) ===
     420 === 4) void '''giet_fbf_cma_init_buf'''( void* buf0_vbase , void* buf1_vbase , void* sts0_vaddr , void* sts1_vaddr ) ===
    414421This function initializes the chained buffer descriptors for the two source buffers and the frame buffer.
    415422The buf0 and buf1 user buffers must be large enough to store a complete image, and must be aligned on a 64 bytes boundary.
     
    420427 * '''sts1_vaddr''' : virtual address of the second buffer status.
    421428
    422  === 3) void '''giet_fbf_cma_start'''( unsigned int length ) ===
     429 === 5) void '''giet_fbf_cma_start'''( unsigned int length ) ===
    423430This 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.
    424431 * '''length''' is the size of the image (bytes).
    425432
    426  === 4) void '''giet_fbf_cma_display'''( unsigned int buffer ) ===
     433 === 6) void '''giet_fbf_cma_display'''( unsigned int buffer ) ===
    427434This function enables the transfer of the specified buffer.
    428435 * '''buffer''' is the buffer index (0 or 1).
    429436
    430  === 5) void '''giet_fbf_cma_stop'''( ) ===
     437 === 7) void '''giet_fbf_cma_stop'''( ) ===
    431438This function desactivates the CMA channel allocated to the calling thread.
    432439
    433  === 6) void '''giet_fbf_sync_read'''( unsigned int offset , void* buffer , unsigned int length ) ===
     440 === 8) void '''giet_fbf_sync_read'''( unsigned int offset , void* buffer , unsigned int length ) ===
    434441This blocking function use a memcopy strategy to transfer data from the frame buffer to an user buffer.
    435442 * '''offset''' defines the offset (in bytes) in the frame buffer,
     
    437444 * '''length'''  is the number of bytes to be transfered.
    438445
    439  === 7) void '''giet_fbf_sync_write'''( unsigned int offset , void* buffer , unsigned int length ) ===
     446 === 9) void '''giet_fbf_sync_write'''( unsigned int offset , void* buffer , unsigned int length ) ===
    440447This blocking function use a memcopy strategy to transfer data from an user buffer to the frame buffer.
    441448 * '''offset''' defines the offset (in bytes) in the frame buffer,