#author("2021-12-05T14:32:59+09:00","default:Real2Virtual202111","Real2Virtual202111")
#author("2021-12-05T16:33:39+09:00","default:Real2Virtual202111","Real2Virtual202111")
[[Real2Virtual202111]]

#code(c){{
//#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

}}
----
#counter



トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS