kstmApp/src/dbSubReadADC.c
changeset 0 bd6bb22c6533
equal deleted inserted replaced
-1:000000000000 0:bd6bb22c6533
       
     1 #include <stdio.h>
       
     2 #include <string.h>
       
     3 
       
     4 #include <dbDefs.h>
       
     5 #include <registryFunction.h>
       
     6 #include <subRecord.h>
       
     7 #include <aSubRecord.h>
       
     8 #include <epicsExport.h>
       
     9 
       
    10 #include "pi_2_dht_read.h"
       
    11 
       
    12 int dbSubReadDHTDebug;
       
    13 
       
    14 static long dbSubReadDHTInit(subRecord *precord)
       
    15 {
       
    16     if (dbSubReadDHTDebug)
       
    17         printf("Record %s called dbSubReadDHTInit(%p)\n",
       
    18                precord->name, (void*) precord);
       
    19     return 0;
       
    20 }
       
    21 
       
    22 static long dbSubReadDHTProcess(subRecord *precord)
       
    23 {
       
    24 char cmd[256];
       
    25 char buf[256];
       
    26 double dumm;
       
    27 
       
    28     if (dbSubReadDHTDebug)
       
    29         printf("Record %s called dbSubReadDHTProcess(%p)\n",
       
    30                precord->name, (void*) precord);
       
    31 
       
    32 
       
    33  pi_2_dht_read(int type, int pin, float* humidity, float* temperature)
       
    34 
       
    35 
       
    36  precord->val = dumm;
       
    37  printf(" val = %lf\n", precord->val );
       
    38 
       
    39     return 0;
       
    40 }
       
    41 
       
    42 static long myAsubInit(aSubRecord *precord)
       
    43 {
       
    44     if (mySubDebug)
       
    45         printf("Record %s called myAsubInit(%p)\n",
       
    46                precord->name, (void*) precord);
       
    47     return 0;
       
    48 }
       
    49 
       
    50 static long myAsubProcess(aSubRecord *precord)
       
    51 {
       
    52     if (mySubDebug)
       
    53         printf("Record %s called myAsubProcess(%p)\n",
       
    54                precord->name, (void*) precord);
       
    55     return 0;
       
    56 }
       
    57 
       
    58 /* Register these symbols for use by IOC code: */
       
    59 
       
    60 epicsExportAddress(int, mySubDebug);
       
    61 epicsRegisterFunction(mySubInit);
       
    62 epicsRegisterFunction(mySubProcess);
       
    63 
       
    64 
       
    65 
       
    66