2 * GraphLCD driver library
4 * common.c - various functions
6 * parts were taken from graphlcd plugin for the Video Disc Recorder
7 * (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de>
9 * This file is released under the GNU General Public License. Refer
10 * to the COPYING file distributed with this package.
12 * (c) 2004 Andreas Regel <andreas.regel AT powarman.de>
15 #ifndef _GLCDDRIVERS_COMMON_H_
16 #define _GLCDDRIVERS_COMMON_H_
23 const unsigned char bitmask[8] = {0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
24 const unsigned char bitmaskl[8] = {0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff};
25 const unsigned char bitmaskr[8] = {0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01};
27 // functions to enable/disable very short sleeps.
28 // Therefore, the priority will be changed. => use with care !
30 int nSleepDeInit(void);
35 unsigned char ReverseBits(unsigned char value);
36 void clip(int & value, int min, int max);
37 void sort(int & value1, int & value2);
38 std::string trim(const std::string & s);