kstmApp/src/dbSubReadADC.c
author Heinz Junkes <junkes@fhi-berlin.mpg.de>
Fri, 14 Aug 2015 11:30:43 +0200
changeset 0 bd6bb22c6533
permissions -rw-r--r--
First import

#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);