hardware 0.0.9

A no_std bare-metal hardware abstraction layer — all port I/O, memory and swap allocations are guarded at runtime. Do not consider this dependency stable before x.1.x
Documentation
use crate::gpu::queue::Queue;

pub struct GpuScheduler {
    queue: Queue,
}

impl Default for GpuScheduler {
    fn default() -> Self {
        Self::new()
    }
}

impl GpuScheduler {
    pub fn new() -> Self {
        GpuScheduler {
            queue: Queue::new(),
        }
    }

    pub fn submit(&self, cmd: crate::gpu::Command) -> bool {
        self.queue.enqueue(cmd)
    }

    pub fn poll(&self) -> Option<crate::gpu::Command> {
        self.queue.dequeue()
    }
}