PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Simplifies reading Parallax ColorPAL sensor. More...
#include "fdserial.h"
Go to the source code of this file.
Functions | |
colorPal * | colorPal_open (int sioPin) |
Open a connection to a Parallax ColorPAL sensor. More... | |
void | colorPal_close (colorPal *device) |
Close a connection and recover all memory set aside for the ColorPal sensor instance. More... | |
void | colorPal_getRGB (colorPal *device, int *r, int *g, int *b) |
Get RGB (red green blue) values from the ColorPAL sensor. More... | |
unsigned int | colorPalRRGGBB (int r, int g, int b) |
Supplies 8-bit white balanced approximations of ColorPal sensor's 12-bit values. Note: The rgb parameters are values, not pointers like they are in the colorPal_getRGB function. More... | |
Simplifies reading Parallax ColorPAL sensor.
Definition in file colorpal.h.
void colorPal_close | ( | colorPal * | device | ) |
Close a connection and recover all memory set aside for the ColorPal sensor instance.
*device | device identifier returned by colorPal_open function. |
Definition at line 141 of file colorpal.c.
void colorPal_getRGB | ( | colorPal * | device, |
int * | r, | ||
int * | g, | ||
int * | b | ||
) |
Get RGB (red green blue) values from the ColorPAL sensor.
*device | device identifier returned by colorPal_open function. |
r | Red value. |
g | Green value. |
b | Blue value. |
Definition at line 47 of file colorpal.c.
colorPal* colorPal_open | ( | int | sioPin | ) |
Open a connection to a Parallax ColorPAL sensor.
sioPin | Propeller I/O pin connected to ColorPAL sensor's SIO pin. |
Definition at line 79 of file colorpal.c.
unsigned int colorPalRRGGBB | ( | int | r, |
int | g, | ||
int | b | ||
) |
Supplies 8-bit white balanced approximations of ColorPal sensor's 12-bit values. Note: The rgb parameters are values, not pointers like they are in the colorPal_getRGB function.
Definition at line 167 of file colorpal.c.