summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-02-15 01:19:41 +0000
committernorly <ny-git@enpas.org>2013-02-15 01:30:22 +0000
commit430ce2a8749eb90ca0f8cdf18f5b217128c43e79 (patch)
tree8c838780bda4c7ebf4f778ca307f01b2d39bdfbe /include
parent2ddbfa53a31360e50565345a1ac08c0799c8243e (diff)
Better file structure and build system
Also fix some warnings
Diffstat (limited to 'include')
-rw-r--r--include/config.h15
-rw-r--r--include/status/battery.h7
-rw-r--r--include/status/cpuusage.h7
-rw-r--r--include/status/datetime.h7
-rw-r--r--include/status/fan.h7
-rw-r--r--include/status/memusage.h7
-rw-r--r--include/status/netif.h7
-rw-r--r--include/status/temp.h7
-rw-r--r--include/status/uptime.h7
-rw-r--r--include/status/volume_alsa.h9
-rw-r--r--include/tools.h9
11 files changed, 89 insertions, 0 deletions
diff --git a/include/config.h b/include/config.h
new file mode 100644
index 0000000..91ad943
--- /dev/null
+++ b/include/config.h
@@ -0,0 +1,15 @@
+
+#ifndef __CONFIG_H__
+#define __CONFIG_H__
+
+#define UPDATE_SECS 1
+
+//#define SHOW_SECONDS
+
+#define NUM_CPUS 2
+#define CPU_HISTORY_SIZE 10
+
+#define POWER_BASEDIR "/sys/class/power_supply/"
+#define NETIF_BASEDIR "/sys/class/net/"
+
+#endif
diff --git a/include/status/battery.h b/include/status/battery.h
new file mode 100644
index 0000000..0824392
--- /dev/null
+++ b/include/status/battery.h
@@ -0,0 +1,7 @@
+
+#ifndef __BATTERY_H__
+#define __BATTERY_H__
+
+void status_battery(char *batname);
+
+#endif
diff --git a/include/status/cpuusage.h b/include/status/cpuusage.h
new file mode 100644
index 0000000..1de2aed
--- /dev/null
+++ b/include/status/cpuusage.h
@@ -0,0 +1,7 @@
+
+#ifndef __CPUUSAGE_H__
+#define __CPUUSAGE_H__
+
+void status_cpuusage();
+
+#endif
diff --git a/include/status/datetime.h b/include/status/datetime.h
new file mode 100644
index 0000000..e4c9554
--- /dev/null
+++ b/include/status/datetime.h
@@ -0,0 +1,7 @@
+
+#ifndef __DATETIME_H__
+#define __DATETIME_H__
+
+void status_datetime();
+
+#endif
diff --git a/include/status/fan.h b/include/status/fan.h
new file mode 100644
index 0000000..dd5e494
--- /dev/null
+++ b/include/status/fan.h
@@ -0,0 +1,7 @@
+
+#ifndef __FAN_H__
+#define __FAN_H__
+
+void status_fan(char *title, char *sysfile);
+
+#endif
diff --git a/include/status/memusage.h b/include/status/memusage.h
new file mode 100644
index 0000000..9db9719
--- /dev/null
+++ b/include/status/memusage.h
@@ -0,0 +1,7 @@
+
+#ifndef __MEMUSAGE_H__
+#define __MEMUSAGE_H__
+
+void status_memusage();
+
+#endif
diff --git a/include/status/netif.h b/include/status/netif.h
new file mode 100644
index 0000000..92ccc1f
--- /dev/null
+++ b/include/status/netif.h
@@ -0,0 +1,7 @@
+
+#ifndef __NETIF_H__
+#define __NETIF_H__
+
+void status_netif(char *ifname);
+
+#endif
diff --git a/include/status/temp.h b/include/status/temp.h
new file mode 100644
index 0000000..0856a17
--- /dev/null
+++ b/include/status/temp.h
@@ -0,0 +1,7 @@
+
+#ifndef __TEMP_H__
+#define __TEMP_H__
+
+void status_temp(char *title, char *sysfile);
+
+#endif
diff --git a/include/status/uptime.h b/include/status/uptime.h
new file mode 100644
index 0000000..153f35d
--- /dev/null
+++ b/include/status/uptime.h
@@ -0,0 +1,7 @@
+
+#ifndef __UPTIME_H__
+#define __UPTIME_H__
+
+void status_uptime();
+
+#endif
diff --git a/include/status/volume_alsa.h b/include/status/volume_alsa.h
new file mode 100644
index 0000000..044824d
--- /dev/null
+++ b/include/status/volume_alsa.h
@@ -0,0 +1,9 @@
+
+#ifndef __VOLUME_ALSA_H__
+#define __VOLUME_ALSA_H__
+
+#include <alsa/asoundlib.h>
+
+int status_volume_alsa(char *cardname, char *mixername, snd_mixer_selem_channel_id_t channel);
+
+#endif
diff --git a/include/tools.h b/include/tools.h
new file mode 100644
index 0000000..802b9f1
--- /dev/null
+++ b/include/tools.h
@@ -0,0 +1,9 @@
+
+#ifndef __TOOLS_H__
+#define __TOOLS_H__
+
+char powerToChar(int power);
+void statusError(char *where, char *what, char *extra);
+ssize_t fileRead(char *buf, size_t bufsize, char *file);
+
+#endif