Changes between Version 22 and Version 23 of library_stdio


Ignore:
Timestamp:
Oct 28, 2014, 12:36:22 PM (10 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • library_stdio

    v22 v23  
    5050The GIET_VM allows an user task to use a private TTY terminal, or to display log message on a shared TTY terminal.
    5151
    52  === unsigned int '''giet_tty_open'''() ===
    53 This function allocates a private terminal to the calling task, and returns the terminal index. This index is registered in the task context. Exit if no TTY terminal.
     52 === void '''giet_tty_start'''() ===
     53This function allocates a private terminal to the calling task, and registers the terminal index in the task context. Task exit if no TTY terminal available.
    5454
    5555  === void '''giet_tty_printf'''( char* format, ... ) ===
     
    6262   * %c : char
    6363   * %s : string
    64 
    65 Exit if  private terminal index not defined, or in case of illegal format.
     64Task exit if  private terminal index not defined, or in case of illegal format.
    6665
    6766 === void '''giet_tty_getc'''( char* byte ) ===
    68 This blocking function fetches a single character from the private terminal that must have been allocated to the calling task in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
    69 
    70 Exit if private TTY index not defined.
     67This blocking function fetches a single character from the private terminal that must have been allocated to the calling task in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer. Task exit if private TTY index not defined.
    7168
    7269 === void '''giet_tty_getw'''( unsigned int* val ) ===
    7370This blocking function fetches a string of decimal characters (most significant digit first) to build a 32-bits unsigned integer from the private TTY terminal  that must have been allocated to the calling task in the application mapping. It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
    74 The non-blocking system function _tty_read is called several times, and the decimal characters are written in a 32 characters buffer until a <LF> character is read. It ignores non-decimal characters, and displays an echo
    75 system function) for each decimal character. The <DEL> character is interpreted, and previous characters can be cancelled.  When the <LF> character is received, the string is converted to an unsigned int value. If the number of decimal digit is too large for the 32 bits range, the zero value is returned.
    76 
    77 Exit if private TTY index not defined.
     71The non-blocking system function _tty_read is called several times, and the decimal characters are written in a 32 characters buffer until a <LF> character is read. It ignores non-decimal characters, and displays an echo  for each decimal character. The <DEL> character is interpreted, and previous characters can be cancelled.  When the <LF> character is received, the string is converted to an unsigned int value. If the number of decimal digit is too large for the 32 bits range, the zero value is returned.
     72Task exit if private TTY index not defined.
    7873
    7974 === void '''giet_tty_gets'''( char* buf, unsigned int bufsize ) ===
     
    8176It uses the TTY_RX_IRQ interrupt, and the associated kernel buffer.
    8277Up to (bufsize - 1) characters (including the non printable characters) are copied into buffer, and the string is completed by a NUL character. The <LF> character is interpreted, and the function close the string with a NUL character if <LF> is read. The <DEL> character is interpreted, and the corresponding character(s) are removed from the target buffer. It does not provide an echo.
    83 
    84 Exit if private TTY index not defined.
     78Task exit if private TTY index not defined.
    8579
    8680 === void '''giet_shr_printf'''( char* format, ... ) ===
    87 This function print formated text on the shared terminal arbitrarily allocated by the kernel. It takes the TTY lock
    88 for exclusive access. It supports the same formats as the giet_tty_printf() function.
     81This function print formated text on a shared terminal arbitrarily allocated by the kernel. It takes the TTY lock for exclusive access. It supports the same formats as the giet_tty_printf() function.
     82Task exit in case of illegal format.
    8983
    90 Exit in case of illegal format.
     84 == __4) Timer related system calls__ ==
     85
     86The GIET_VM allows an user task to activate a private timer channel, generating periodical IRQs. This timer is allocated in the external multi-timers peripheral.
     87
     88 === void '''giet_timer_start'''( unsigned int period )
     89This function allocates a private user timer  to the calling task, registers the channel index
     90in the task context,  and activates the timer.
     91Task exit if no timer channel available
     92
     93 === void '''giet_timer_stop'''( ) ===
     94This function stops the private user timer allocated to the calling task.
    9195
    9296 == __4) File system related system calls__ ==
     
    9599
    96100 === int '''giet_fat_open'''( const char* pathname, unsigned int flags ) ===
    97 Open a file identified by the ''pathname'' argument. The read/write ''flags''  are not supported yet: no effect.
    98 Return -1 in case or error.
     101Open a file identified by the ''pathname'' argument. The read/write ''flags''  are not supported yet: no effect. Return -1 in case or error.
    99102
    100103 === void '''giet_fat_read'''( unsigned int fd, void* buffer, unsigned int count, unsigned int offset ) ===