colorpal library  v0.51
Simplifies monitoring ColorPAL sensor with the Propeller.
colorpal.h
Go to the documentation of this file.
1 
14 #include "fdserial.h"
15 
16 #ifndef COLORPAL_H
17 #define COLORPAL_H
18 
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22 
23 
29 typedef struct colorPal_st
30 {
31  int rx_head; /* receive queue head */
32  int rx_tail; /* receive queue tail */
33  int tx_head; /* transmit queue head */
34  int tx_tail; /* transmit queue tail */
35  int rx_pin; /* recieve pin */
36  int tx_pin; /* transmit pin */
37  int mode; /* interface mode */
38  int ticks; /* clkfreq / baud */
39  char *buffptr; /* pointer to rx buffer */
40  //char *idstr;
41  //int en;
42 } colorPal_t;
43 
44 
49 typedef text_t colorPal;
50 
51 
66 colorPal *colorPal_open(int sioPin);
67 
74 void colorPal_close(colorPal *device);
75 
76 
88 void colorPal_getRGB(colorPal *device, int *r, int *g, int *b);
89 
90 // ColorPal RRGGBB converter
91 
105 unsigned int colorPalRRGGBB( int r, int g, int b );
106 
107 
108 #if defined(__cplusplus)
109 }
110 #endif
111 /* __cplusplus */
112 #endif
113 /* COLORPAL_H */
114 
115