Čeština / English
Login

SVN Repository / Prohlížení

Aktuální adresář: FITkit / trunk / mcu / libfitkit /

globfun.h

   1  /*******************************************************************************
   2     globfunc.h:
   3     Copyright (C) 2009 Brno University of Technology,
   4                        Faculty of Information Technology
   5  
   6     LICENSE TERMS
   7  
   8     Redistribution and use in source and binary forms, with or without
   9     modification, are permitted provided that the following conditions
  10     are met:
  11     1. Redistributions of source code must retain the above copyright
  12        notice, this list of conditions and the following disclaimer.
  13     2. Redistributions in binary form must reproduce the above copyright
  14        notice, this list of conditions and the following disclaimer in
  15        the documentation and/or other materials provided with the
  16        distribution.
  17     3. All advertising materials mentioning features or use of this software
  18        or firmware must display the following acknowledgement:
  19  
  20          This product includes software developed by the University of
  21          Technology, Faculty of Information Technology, Brno and its
  22          contributors.
  23  
  24     4. Neither the name of the Company nor the names of its contributors
  25        may be used to endorse or promote products derived from this
  26        software without specific prior written permission.
  27  
  28     This software or firmware is provided ``as is'', and any express or implied
  29     warranties, including, but not limited to, the implied warranties of
  30     merchantability and fitness for a particular purpose are disclaimed.
  31     In no event shall the company or contributors be liable for any
  32     direct, indirect, incidental, special, exemplary, or consequential
  33     damages (including, but not limited to, procurement of substitute
  34     goods or services; loss of use, data, or profits; or business
  35     interruption) however caused and on any theory of liability, whether
  36     in contract, strict liability, or tort (including negligence or
  37     otherwise) arising in any way out of the use of this software, even
  38     if advised of the possibility of such damage.
  39  
  40     $Id$
  41  
  42     Popis:
  43       Definice globalnich funkci.
  44  *******************************************************************************/
  45  
  46  #ifndef _GLOBFUN_H_
  47  #define _GLOBFUN_H_
  48  
  49  
  50  /**
  51  
  52  
  53  
  54  
  55   **/
  56  void chr2bin(unsigned char *buf, unsigned char chr);
  57  
  58  /**
  59  
  60  
  61  
  62  
  63   **/
  64  void chr2hex(unsigned char *buf, unsigned char chr);
  65  
  66  /**
  67  
  68  
  69  
  70   **/
  71  unsigned char chr2digit(unsigned char chr);
  72  
  73  /**
  74  
  75  
  76   \return znak
  77   **/
  78  char digit2chr(char chr);
  79  
  80  /**
  81  
  82  
  83  
  84   **/
  85  unsigned char rchr(unsigned char chr);
  86  
  87  /*******************************************************************************
  88   * Fce prevadi long na string v hexa.
  89   * - input...prevadena hodnota
  90   * - buf.....vysledny retezec
  91  *******************************************************************************/
  92  //void long2strhex(long input, char *str);
  93  
  94  /**
  95  
  96  
  97  
  98   **/
  99  long str2long(char *buf);
 100  
 101  /**
 102  
 103  
 104  
 105  
 106  
 107   **/
 108  long str2long_2x(char *buf, long *n1, long *n2);
 109  
 110  /**
 111  
 112  
 113  
 114   **/
 115  char *strrev(char *buf);
 116  
 117  /**
 118  
 119   \param dest - vystupni buffer
 120   \param buf - vstupni string
 121   **/
 122  void strupper(unsigned char *dest, unsigned char *buf);
 123  
 124  /**
 125  
 126  
 127  
 128  
 129   **/
 130  void long2str(long input, char *buf, long radix);
 131  
 132  
 133  /**
 134  
 135  
 136  
 137   **/
 138  unsigned char hex2chr(unsigned char *buf);
 139  
 140  #endif /* _GLOBFUN_H_ */
 141  
Zobrazeno: 731734x Naposledy: 29.11.2022 04:49:04