CoffeePi
Coffee machine control for Raspberry Pi
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdint.h>
#include <wiringPi.h>
#include <pthread.h>
#include <unistd.h>
#include <iostream>
#include <csignal>
#include <time.h>
#include "global.h"
#include "timer.h"
#include "database.h"
#include "logger.h"
#include "lcd.h"
#include "hal.h"
#include "stripe.h"
#include "coffee.h"
#include "buildno"
Functions | |
void * | mainLoop (void *threadid) |
Main Thread, used for some initializations and error detection. More... | |
void | terminationHandler (int signum) |
Handler for program termination caught via signal. More... | |
void | usr1Handler (int signum) |
Handles the signal USR2. More... | |
void | hupHandler (int signum) |
Handles the signal HUP and starts a speed test. More... | |
void | timeHandler (void) |
Temporary timer for displaying the current time. More... | |
int | main (int argc, char *argv[]) |
void | killThread (int threadid, int sig) |
Sends a signal to a thread. More... | |
Variables | |
const int | buildno |
int | lcd = 0 |
int | verbose = 0 |
bool | optDate = false |
bool | optPower = false |
timer timeTimer & | timeHandler |
Temporary timer for displaying the current time. More... | |
pthread_t | thread [4] |
pthread_mutex_t | mutex |
void hupHandler | ( | int | signum | ) |
Handles the signal HUP and starts a speed test.
void killThread | ( | int | threadid, |
int | sig | ||
) |
Sends a signal to a thread.
threadid | ID of the thread |
sig | Signal to send |
int main | ( | int | argc, |
char * | argv[] | ||
) |
void * mainLoop | ( | void * | threadid | ) |
Main Thread, used for some initializations and error detection.
threadid | Thread ID |
void terminationHandler | ( | int | signum | ) |
Handler for program termination caught via signal.
void timeHandler | ( | void | ) |
Temporary timer for displaying the current time.
void usr1Handler | ( | int | signum | ) |
Handles the signal USR2.
const int buildno |
int lcd = 0 |
pthread_mutex_t mutex |
bool optDate = false |
bool optPower = false |
pthread_t thread[4] |
void timeHandler |
Temporary timer for displaying the current time.
int verbose = 0 |