1234567891011121314151617181920212223242526272829303132333435363738 |
- /**********************************************************************
- 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 "nodes.sqlite"
- // Global variables
- extern int verbose;
- extern bool optDate, optPower;
- extern pthread_mutex_t mutex;
- extern int lcd;
- // Thread IDs
- #define THREAD_MAIN 0
- #define THREAD_STRIPE 1
- #define THREAD_DISPLAY 2
- void killThread(int threadid, int sig);
- #endif
|