dsprint
dsprint is a small C library for direct writing of text into the memory of a video buffer or a frame buffer driving a LCD or CRT display. Currently is 15 and 16 bit color formats supported in little endian. dsprint is a general useable tool for embedded developers. It allows them to write text from a bootloader or small standalone applications directly to the screen (Direct Screen Print). dsprint is compiled with gcc and tested on a PXA270 XSCALE driving a 320x240 LCD.
dsprint has included a simple 8x8 matrix font for 15/16 bit color displays but it can easily be adopted for another matrix or color depth.
dsprint is licensed under the GNU Lesser General Public License (LGPL).
dsprint includes the following functions:
extern void printInit(char * screen, int w, int h); /* Tell dsprint where to find the screen memory */
extern void printChr(char c); /* Print a single character */
extern void print(char *cptr); /* Print a zero terminated string "\r" "\n" are supported */
extern void println(); /* Print a newline */
extern void printAt(int row, int col, char *cptr); /* Print a string at row, column */
extern void printXY(int x, int y, char *cptr); /* Print a string at x,y pixel coordinates from upper left corner */
extern void printUnsigned(unsigned value); /* Print an unsigned 32 bit integer */
extern void printInt(int value); /* Print a signed 32 bit integer */
extern void printIntField(int value, int fieldWidth); /* Print a signed 32 bit integer in a field with a given width */
extern void printUnsignedZeros(int value, int fieldWidth); /* Print an unsigned 32 bit integer with a given number of digits */
extern void printHex(unsigned value); /* Print an unsigned 32 bit integer in hex */
extern void printCharHex(unsigned char value); /* Print an unsigned char in hex */
extern void window(int x, int y, int w, int h); /* Set the active text window to a a part of the full screen */
extern void fullScreen(); /* Set the active text window to the full screen */
extern void clear(); /* Clear the active text window */
extern void scroll(); /* Scroll the active text window by one line */
Download dsprint source code
sequence
sequence is a UNIX/Linux command line tool for generation binary or ASCII test sequences. Sequence is specially useful in bash scripts for test data generation when testing and debugging your own linux device drivers or playing with flash or MTD devices.
Sequence is compiled with gcc and tested on an Apple powerbook.
Sequence is licensed under the GNU General Public License (GPL).
Note: sequence is different from the seq command found on some systems mainly because sequence is designed to generate binary data sequences.
sequence command usage:
Usage: sequence -[a][b][e][h][s][x][1|2|3|4] [-c <counter start>] [-d <delimiter>] [-i <ifile>]
[-p <pad value>] [-l <length>] [-r <repetitions>] [-1|2|4] [-o <ofile>] <data> {[to] <data>}
-a : Output numbers in the sequence in ASCII instead of binary format
-b : Binary ifile. Data in input file is binary data. Requires -i option
-c <counter start> : Counter start value. Requires -r option
-d <delimiter> : Delimiter character when outputting numbers in ASCII. Requires -a option
-e : Use opposite endian of this computer
-h : Help. Display this usage message
-i <ifile> : Get input data from ifile instead of stdin/commandline
-l <length> : Add trailing zeros or pad values until length is reached
-o <ofile> : Output to file instead of stdout
-p <pad value> : Pad value to fill trailing sequence data with. Requires -l option
-r <repetitions> : Repeat the sequence a number of times
-s : Step values etc.
-1|2|3|4 : Type of the data. 1,2,3 or 4 bytes pr data
-x : Interpret all numbers as hex
{<data>} : Data values - default in decimal
<data> to <data> : Sequence: Eg. 1 to 4 equ. 1 2 3 4
{<data>} to <data> : Advanced sequence Eg. 1 3 to 9 equ. 1 3 5 7 9. Requieres -s option
Where <data> ::= <unsigned number> | time | mtime | utime | count | string <a string>
Download sequence source code