K22 processor

SPIprotokol/IOspiprotokol.h

Committer:
bosko001
Date:
2021-04-30
Revision:
15:3429cdc6e5f4
Parent:
7:4aa3dac73b66

File content as of revision 15:3429cdc6e5f4:

#ifndef IOSPIPROTOKOL_H
#define IOSPIPROTOKOL_H

//#include "IOspitelegram.h"
#include "IOspiConnect.h"
#include "IOdata.h"
#include "ledControl.h"

class C_spiProtokol: public C_spiConnect
{
    C_data *pc_data;
    C_ledControl *pc_ledControl;
    public:

        C_spiProtokol( C_data *pc_data, C_ledControl *pc_ledControl): C_spiConnect()//(/*PTD6, PTD7, PTD5*/)
        { 
            this->pc_data = pc_data; 
            this->pc_ledControl = pc_ledControl; 
            set_myAddress( pc_data->get_address());
            set_reset(true);
        };

        void do_writeCommand( const char command, const char data) override; 
        char do_readCommand( const char command, const char data) override;
        void do_readGroupCommand( const char command) override;
 
        void inic_address( void ) { set_myAddress(pc_data->get_address());  }
};




#endif