|
CoffeePi
Coffee machine control for Raspberry Pi
|
Go to the source code of this file.
Data Structures | |
| struct | stripe_color |
Macros | |
| #define | I2C_ADDRESS_STRIPE 0x69 |
| #define | STRIPE_CMD_SETR 0x01 |
| #define | STRIPE_CMD_SETG 0x02 |
| #define | STRIPE_CMD_SETB 0x03 |
| #define | STRIPE_CMD_SETW 0x04 |
| #define | STRIPE_CMD_SETDIM 0x05 |
| #define | STRIPE_CMD_SET 0x06 |
| #define | STRIPE_CMD_SET2 0x07 |
| #define | STRIPE_CMD_RESET 0x09 |
| #define | STRIPE_CMD_FADEOUT 0x0A |
| #define | STRIPE_CMD_FADETO 0x0B |
| #define | STRIPE_CMD_FADESTOP 0x0C |
Enumerations | |
| enum | stripe_transient_t { TRANS_DIRECT = 0, TRANS_FAST = 6, TRANS_MEDIUM = 35, TRANS_SLOW = 200 } |
Functions | |
| void * | stripeThread (void *threadid) |
| Thread for the stripe control. More... | |
| void * | stripeTimerHandler (void *threadid) |
| This is the handler for time based stripe effects. More... | |
| void | stripeInit (void) |
| Initializes i2c communication to stripe controller. More... | |
| int | stripeCommand (int len, char *data) |
| Sends out command data to the stripe controller via i2c. More... | |
| void | stripeUpdate (void) |
| Updates the color data and prepares the stripe command. More... | |
| void | stripeUpdateDim (void) |
| Updates the dimmer value of the stripe. More... | |
| void | stripeSetRGB (int red, int green, int blue) |
| Updates the color of the stripe. More... | |
| void | stripeSetColor (stripe_color color) |
| Updates the color of the stripe. More... | |
| void | stripeSetTransient (stripe_transient_t transient) |
| Updates the transient time for the stripe (fading) More... | |
| void | stripeSetDim (int dim) |
| Updates the dimmer value of the stripe. More... | |
| void | stripeSetWhite (int white) |
| Updates the white value of the stripe (4th channel) More... | |
| void | stripeOn (void) |
| Turns the stripe on (Sets dimmer to 100%) More... | |
| void | stripeOff (void) |
| Turns the stripe on (Sets dimmer to 0%) More... | |
| void | stripeGetRGB (int *red, int *green, int *blue) |
| Reads the current stripe color. More... | |
| void | stripeGetDim (int *dim) |
| Reads the current stripe dimmer value. More... | |
| void | stripeGetWhite (int *white) |
| Reads the current stripe white value (4th channel) More... | |
| void | stripeEffectDisable (void) |
| Stops current running effects. More... | |
| void | stripeEffectHeating (int percent) |
| Sets the stripe to a correspondending color to the heating status. More... | |
| void | stripeEffectPulse (stripe_color color) |
| Enables pulsing with a given color of the stripe. More... | |
| #define I2C_ADDRESS_STRIPE 0x69 |
| #define STRIPE_CMD_FADEOUT 0x0A |
| #define STRIPE_CMD_FADESTOP 0x0C |
| #define STRIPE_CMD_FADETO 0x0B |
| #define STRIPE_CMD_RESET 0x09 |
| #define STRIPE_CMD_SET 0x06 |
| #define STRIPE_CMD_SET2 0x07 |
| #define STRIPE_CMD_SETB 0x03 |
| #define STRIPE_CMD_SETDIM 0x05 |
| #define STRIPE_CMD_SETG 0x02 |
| #define STRIPE_CMD_SETR 0x01 |
| #define STRIPE_CMD_SETW 0x04 |
| enum stripe_transient_t |
| int stripeCommand | ( | int | len, |
| char * | data | ||
| ) |
Sends out command data to the stripe controller via i2c.
| len | Length of the data array |
| *data | Pointer to data array |
| void stripeEffectDisable | ( | void | ) |
Stops current running effects.
| void stripeEffectHeating | ( | int | percent | ) |
Sets the stripe to a correspondending color to the heating status.
| percent | Heating level (0-100%) |
| void stripeEffectPulse | ( | stripe_color | color | ) |
Enables pulsing with a given color of the stripe.
| color | Effect color |
| void stripeGetDim | ( | int * | dim | ) |
Reads the current stripe dimmer value.
| *dim | Pointer to dimmer variable |
| void stripeGetRGB | ( | int * | red, |
| int * | green, | ||
| int * | blue | ||
| ) |
Reads the current stripe color.
| *red | Pointer to red variable |
| *green | Pointer to green variable |
| *blue | Pointer to blue variable |
| void stripeGetWhite | ( | int * | white | ) |
Reads the current stripe white value (4th channel)
| *white | Pointer to white variable |
| void stripeInit | ( | void | ) |
Initializes i2c communication to stripe controller.
| void stripeOff | ( | void | ) |
Turns the stripe on (Sets dimmer to 0%)
| void stripeOn | ( | void | ) |
Turns the stripe on (Sets dimmer to 100%)
| void stripeSetColor | ( | stripe_color | color | ) |
Updates the color of the stripe.
| color | Color struct |
| void stripeSetDim | ( | int | dim | ) |
Updates the dimmer value of the stripe.
| dim | Dimmer value |
| void stripeSetRGB | ( | int | red, |
| int | green, | ||
| int | blue | ||
| ) |
Updates the color of the stripe.
| red | Red value (max 255) |
| green | Green value (max 255) |
| blue | Blue value (max 255) |
| void stripeSetTransient | ( | stripe_transient_t | transient | ) |
Updates the transient time for the stripe (fading)
| transient | Transient time in ticks |
| void stripeSetWhite | ( | int | white | ) |
Updates the white value of the stripe (4th channel)
| white | White value |
| void* stripeThread | ( | void * | threadid | ) |
Thread for the stripe control.
Requests data from other threads or HAL
| *threadid | Thread ID |
| void* stripeTimerHandler | ( | void * | threadid | ) |
This is the handler for time based stripe effects.
| *threadid | Thread ID |
| void stripeUpdate | ( | void | ) |
Updates the color data and prepares the stripe command.
| void stripeUpdateDim | ( | void | ) |
Updates the dimmer value of the stripe.
1.8.10