bosko lekovic
/
IO_board
IO plocana FRDM K64
SPIprotokol/IOspiprotokol.h@16:a3085300cac3, 2021-04-30 (annotated)
- Committer:
- bosko001
- Date:
- Fri Apr 30 00:08:07 2021 +0200
- Revision:
- 16:a3085300cac3
- Parent:
- 15:3429cdc6e5f4
i zero crossing dodat
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bosko001 | 7:4aa3dac73b66 | 1 | #ifndef IOSPIPROTOKOL_H |
bosko001 | 7:4aa3dac73b66 | 2 | #define IOSPIPROTOKOL_H |
bosko001 | 7:4aa3dac73b66 | 3 | |
bosko001 | 7:4aa3dac73b66 | 4 | //#include "IOspitelegram.h" |
bosko001 | 7:4aa3dac73b66 | 5 | #include "IOspiConnect.h" |
bosko001 | 7:4aa3dac73b66 | 6 | #include "IOdata.h" |
bosko001 | 7:4aa3dac73b66 | 7 | #include "ledControl.h" |
bosko001 | 7:4aa3dac73b66 | 8 | |
bosko001 | 7:4aa3dac73b66 | 9 | class C_spiProtokol: public C_spiConnect |
bosko001 | 7:4aa3dac73b66 | 10 | { |
bosko001 | 7:4aa3dac73b66 | 11 | C_data *pc_data; |
bosko001 | 7:4aa3dac73b66 | 12 | C_ledControl *pc_ledControl; |
bosko001 | 7:4aa3dac73b66 | 13 | public: |
bosko001 | 7:4aa3dac73b66 | 14 | |
bosko001 | 7:4aa3dac73b66 | 15 | C_spiProtokol( C_data *pc_data, C_ledControl *pc_ledControl): C_spiConnect()//(/*PTD6, PTD7, PTD5*/) |
bosko001 | 7:4aa3dac73b66 | 16 | { |
bosko001 | 7:4aa3dac73b66 | 17 | this->pc_data = pc_data; |
bosko001 | 7:4aa3dac73b66 | 18 | this->pc_ledControl = pc_ledControl; |
bosko001 | 7:4aa3dac73b66 | 19 | set_myAddress( pc_data->get_address()); |
bosko001 | 7:4aa3dac73b66 | 20 | set_reset(true); |
bosko001 | 7:4aa3dac73b66 | 21 | }; |
bosko001 | 7:4aa3dac73b66 | 22 | |
bosko001 | 7:4aa3dac73b66 | 23 | void do_writeCommand( const char command, const char data) override; |
bosko001 | 7:4aa3dac73b66 | 24 | char do_readCommand( const char command, const char data) override; |
bosko001 | 15:3429cdc6e5f4 | 25 | void do_readGroupCommand( const char command) override; |
bosko001 | 15:3429cdc6e5f4 | 26 | |
bosko001 | 7:4aa3dac73b66 | 27 | void inic_address( void ) { set_myAddress(pc_data->get_address()); } |
bosko001 | 7:4aa3dac73b66 | 28 | }; |
bosko001 | 7:4aa3dac73b66 | 29 | |
bosko001 | 7:4aa3dac73b66 | 30 | |
bosko001 | 7:4aa3dac73b66 | 31 | |
bosko001 | 7:4aa3dac73b66 | 32 | |
bosko001 | 7:4aa3dac73b66 | 33 | #endif |