urobotc.h
Go to the documentation of this file.
00001 /* $B%S%C%H$H%A%c%s%M%k$NBP1~(B */
00002 #define CH0 1
00003 #define CH1 2
00004 #define CH2 4
00005 #define CH3 8
00006 
00007 /* $B%G%8%?%kF~NOMQ$N%^%9%/(B */
00008 #define DIN0 0x10
00009 #define DIN1 0x20
00010 
00011 /* $B%G%8%?%k=PNOMQ$N%^%9%/(B */
00012 #define DO_DOUT 0x1
00013 #define DOUT0 0x08
00014 #define DOUT1 0x20
00015 #define DOUT2 0x40
00016 #define DOUT3 0x80
00017 
00018 struct uin {
00019   unsigned short time; /* $BFbIt%+%&%s%?(B (1ms$B<~4|(B)$B$NCM(B */
00020   unsigned short ad[4];/* A/D $B%3%s%P!<%?$NCM(B(10bit) */
00021   short ct[4];         /* 2$BAj%+%&%s%?$NCM(B(16bit) */
00022   unsigned short da[4];/* D/A $B=PNO$NCM(B($B>e0L(B 8/12bit$B$,M-8z(B) */
00023   unsigned char din;   /* $B%G%8%?%kF~NO(B */
00024   unsigned char dout;  /* $B%G%8%?%k=PNO(B */
00025   unsigned short intmax;  /* $B%=%U%H%&%'%"%+%&%s%?$N:GBg<~4|(B */
00026   unsigned short interval;/* $B%=%U%H%&%'%"%+%&%s%?$N:G6a$N<~4|(B */
00027   unsigned short magicno; /* EEPROM $BFb$N?t;z(B */
00028   char dmy[30];
00029 };
00030 
00031 struct scmd {
00032   short x;             /* $BL\I80LCV(B */
00033   short d;             /* $BL\I8B.EY(B */
00034   signed short kp;     /* $B0LCV8m:9%2%$%s(B($BJ,;R(B) */
00035   unsigned short kpx;  /* $B0LCV8m:9%2%$%s(B($BJ,Jl(B) */
00036   signed short kd;     /* $BB.EY8m:9%2%$%s(B($BJ,;R(B) */
00037   unsigned short kdx;  /* $BB.EY8m:9%2%$%s(B($BJ,Jl(B) */
00038   signed short ki;     /* $B@QJ,8m:9%2%$%s(B($BJ,;R(B) */
00039   unsigned short kix;  /* $B@QJ,8m:9%2%$%s(B($BJ,Jl(B) */
00040 };
00041 
00042 struct uout {
00043   struct scmd ch[4];
00044 };
00045 
00046 #define RETURN_VAL 1
00047 #define SET_SELECT 0x80
00048 #define SET_POSNEG 0x80
00049 #define SET_BREAKS 0x80
00050 #define SET_CH2_HIN 0x40
00051 #define WR_MAGIC 0x80
00052 #define WR_SELOUT 0x40
00053 #define WR_OFFSET 0x20
00054 #define WR_BREAKS 0x10
00055 
00056 struct ccmd {
00057   unsigned char retval;    /* $B<!$KFbIt%+%&%s%?$,>e$,$C$?$H$-$NCM$r(B EP1 $B$+$iJV$9(B */
00058   unsigned char setoffset; /* $B%*%U%;%C%H$r%;%C%H$9$k%A%c%s%M%k$N;XDj(B */
00059   unsigned char setcounter;/* $B%+%&%s%?$NCM$r%;%C%H$9$k%A%c%s%M%k$N;XDj(B */
00060   unsigned char resetint;  /* $B@QJ,CM$r%j%;%C%H$9$k%A%c%s%M%k$N;XDj(B */
00061   unsigned char selin;     /* counter(0)/ADC(1) $B$NA*Br(B */
00062   unsigned char dout;      /* $B%G%8%?%k=PNO(B */
00063   unsigned short offset[4];         /* $B%*%U%;%C%H$NCM(B */
00064   short counter[4];        /* $B%+%&%s%?$NCM(B */
00065   unsigned char selout;    /* PWM $B$r(B D/A $B8~$1(B(0)$B$H$9$k$+(B
00066                               H $B%V%j%C%88~$1(B(1)$B$H$9$k$+(B */
00067   unsigned char wrrom;
00068   unsigned short magicno;
00069   unsigned char posneg;    /* PWM $B%Q%k%9$N@5(B/$BIi(B */
00070   unsigned char breaks;    /* break $B=PNO(B */
00071   char dummy[36];
00072 };


cirkit_unit03_base
Author(s): CIR-KIT
autogenerated on Thu Jun 6 2019 21:08:13