Skip to content

Commit

Permalink
[drivewire][cpm] start stubbing funcs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tschak909 committed Apr 29, 2024
1 parent d5439d1 commit 70c1919
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 3 deletions.
5 changes: 5 additions & 0 deletions lib/bus/drivewire/drivewire.cpp
Expand Up @@ -225,6 +225,11 @@ void systemBus::op_fuji()
theFuji.process();
}

void systemBus::op_cpm()
{
theCPM.process();
}

void systemBus::op_net()
{
// Get device ID
Expand Down
1 change: 1 addition & 0 deletions lib/bus/drivewire/drivewire.h
Expand Up @@ -218,6 +218,7 @@ class systemBus
void op_readex();
void op_fuji();
void op_net();
void op_cpm();
void op_write();
void op_time();
void op_init();
Expand Down
43 changes: 43 additions & 0 deletions lib/device/drivewire/cpm.cpp
Expand Up @@ -57,4 +57,47 @@ drivewireCPM::~drivewireCPM()
vQueueDelete(txq);
}

void drivewireCPM::boot()
{

}

void drivewireCPM::read()
{

}

void drivewireCPM::write()
{

}

void drivewireCPM::status()
{

}

void drivewireCPM::process()
{
uint8_t cmd = fnUartBUS.read();

switch(cmd)
{
case 'B':
boot();
break;
case 'R':
read();
break;
case 'W':
write();
break;
case 'S':
status();
break;
}
}

drivewireCPM theCPM;

#endif /* BUILD_COCO */
10 changes: 7 additions & 3 deletions lib/device/drivewire/cpm.h
Expand Up @@ -20,12 +20,16 @@ class drivewireCPM : public virtualDevice
TaskHandle_t cpmTaskHandle = NULL;
#endif /* ESP_PLATFORM */

void boot();

public:
drivewireCPM();
virtual ~drivewireCPM();

virtual void process();
virtual void boot();
virtual void read();
virtual void write();
virtual void status();
};

extern drivewireCPM theCPM;

#endif /* DRIVEWIRECPM_H */

0 comments on commit 70c1919

Please sign in to comment.