Real2Virtual202111

٤Ƴ٤Ĥ
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
-
|
!
 
 
-
|
|
|
|
|
-
!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
!
-
!
//#ifndef OUTBUFFER_H
//#define OUTBUFFER_H
#pragma once
#include "common.h"
 
class OutBuffer{
private:   
   unsigned char channelID; /* output channel ID */
   unsigned char output;   /* output char */
   unsigned char pb;       /* current output bits position*/
   unsigned char bits[BitsParChar];  /* output code (char) */
//   unsigned char sampleInterval;  /* sampling interval for the timer */
   unsigned char sampleIntervalCounter;
   unsigned char status;
   unsigned char stringOutputStatus;
   unsigned char ledNo;    /* led No for the output */
   int strp;       /* current output char position*/
   int strl;       /* length of the output string */
   int sendingLength;
   int sentLength;
   int ackFlag;
   unsigned char str[MaxInterFaceStrLen];   /* output string */
   unsigned char allOrOne;   /* LEDs emmision mode */
public:
   OutBuffer(unsigned char id);
   void clear(void);
   unsigned char (*getPort[DirMax])(void); /* get port status for the led out */
   unsigned char getStatus(void);
   unsigned char getStringOutputStatus(void);
   unsigned char isOutPutting(void);
   unsigned char putChar(unsigned char c);
   void putChar1(unsigned char c);
   int putString(char *s);
   void putStringStart( char *s);
   int putStringEnd( char *s);
   void putStringWaitPreviousOutput(void); 
   void putStringX(char *s);
   void (*setPort[DirMax])(unsigned char s); /* port on functions for the led out */
   void (*setPortMode[DirMax])(unsigned char s);
   void (*setPortX)( unsigned char s); /* port on function for all led out */
   void (*setPortXMode)(unsigned char s); /* port off function for all led out*/
   void setPortConf(unsigned char ledn, void (* portf)(unsigned char x), unsigned char (* gportf)(void), void (* modef)(unsigned char x) );
   void setPortXConf(void (* portf)(unsigned char x), void (* modef)(unsigned char x) );
   void intrProcess(void); /* interrupt process */
   void setLedNumber( unsigned char n);
   void setLedOn( unsigned char n);
   void setLedOff( unsigned char n);
   void setLedNo(unsigned char ledNo);
   void setPortXOn(void);
   void setPortXOff(void);
   void setStatus( unsigned char s);
   void setAllOrOne( unsigned char allOrOne);
     void setStringOutputStatus(unsigned char c);
   void waitUntilOutputDone(void);
     int waitForAck(void);
};
//#endif
 

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS