global.h
Go to the documentation of this file.
/**********************************************************************
Universitaet Ulm
Abteilung Organisation und Management von Informationssystemen
Author: Philipp Hinz
**********************************************************************/
#ifndef _GLOBAL_H_
#define _GLOBAL_H_
#include <pthread.h>
#define SPI_CHANNEL 1 // 0 or 1 on Raspberry Pi
#define SPI_SPEED 200000 // SPI clock speed in Hz
#define TIMER_DELAY_US 50000 // Basic timer delay in us
// SQL config
#define SQL_DATABASE "coffee.sqlite"
// Global variables
extern int verbose;
extern bool optDate, optPower, optCold;
extern pthread_mutex_t mutex;
extern pthread_t thread[];
// Thread IDs
#define THREAD_MAIN 0
#define THREAD_STRIPE 1
#define THREAD_DISPLAY 2
#define THREAD_COFFEE 3
void killThread(int threadid, int sig);
#endif
killThread
void killThread(int threadid, int sig)
Sends a signal to a thread.
Definition: main.cpp:216
optDate
bool optDate
Definition: main.cpp:33
thread
pthread_t thread[]
Definition: main.cpp:41
mutex
pthread_mutex_t mutex
Definition: main.cpp:42
verbose
int verbose
Definition: main.cpp:32
optCold
bool optCold
Definition: main.cpp:35
optPower
bool optPower
Definition: main.cpp:34