tma: First pass at tio file read/write

This commit is contained in:
Michael Scire
2018-12-06 15:32:27 -08:00
parent efcce68a56
commit 600ad660a6
16 changed files with 600 additions and 15 deletions

View File

@@ -24,6 +24,21 @@ void TmaTask::SetNeedsPackets(bool n) {
this->manager->Tick();
}
TmaPacket *TmaTask::AllocateSendPacket(bool continuation) {
auto packet = this->manager->AllocateSendPacket();
packet->SetServiceId(this->service_id);
packet->SetTaskId(this->task_id);
packet->SetCommand(this->command);
packet->SetContinuation(continuation);
return packet;
}
void TmaTask::FreePacket(TmaPacket *packet) {
this->manager->FreePacket(packet);
}
void TmaTask::Complete() {
SetNeedsPackets(false);
this->state = TmaTaskState::Complete;