peek_bit Function (Macro)

peekpoke.h

short peek_bit (unsigned char *addr, short bit);

Fetches a bit from the memory.

peek_bit is a macro which fetches bit bit from the memory address addr. For example, to read the first bit from the video memory (the pixel in the upper left corner), do this:

byte = peek_bit (0x4C00, 7);
Note that it is better to use LCD_MEM in this case.

Note: Do not use peek_bit for reading I/O ports! Use peekIO_bit instead.