kstmApp/src/dbSubReadADC.c
changeset 0 bd6bb22c6533
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kstmApp/src/dbSubReadADC.c	Fri Aug 14 11:30:43 2015 +0200
@@ -0,0 +1,66 @@
+#include <stdio.h>
+#include <string.h>
+
+#include <dbDefs.h>
+#include <registryFunction.h>
+#include <subRecord.h>
+#include <aSubRecord.h>
+#include <epicsExport.h>
+
+#include "pi_2_dht_read.h"
+
+int dbSubReadDHTDebug;
+
+static long dbSubReadDHTInit(subRecord *precord)
+{
+    if (dbSubReadDHTDebug)
+        printf("Record %s called dbSubReadDHTInit(%p)\n",
+               precord->name, (void*) precord);
+    return 0;
+}
+
+static long dbSubReadDHTProcess(subRecord *precord)
+{
+char cmd[256];
+char buf[256];
+double dumm;
+
+    if (dbSubReadDHTDebug)
+        printf("Record %s called dbSubReadDHTProcess(%p)\n",
+               precord->name, (void*) precord);
+
+
+ pi_2_dht_read(int type, int pin, float* humidity, float* temperature)
+
+
+ precord->val = dumm;
+ printf(" val = %lf\n", precord->val );
+
+    return 0;
+}
+
+static long myAsubInit(aSubRecord *precord)
+{
+    if (mySubDebug)
+        printf("Record %s called myAsubInit(%p)\n",
+               precord->name, (void*) precord);
+    return 0;
+}
+
+static long myAsubProcess(aSubRecord *precord)
+{
+    if (mySubDebug)
+        printf("Record %s called myAsubProcess(%p)\n",
+               precord->name, (void*) precord);
+    return 0;
+}
+
+/* Register these symbols for use by IOC code: */
+
+epicsExportAddress(int, mySubDebug);
+epicsRegisterFunction(mySubInit);
+epicsRegisterFunction(mySubProcess);
+
+
+
+