use alloc::boxed::Box;
use async_trait::async_trait;
use yggdrasil_abi::{error::Error, io::device::spi::SpiConfig};

use crate::device::Device;

#[async_trait]
pub trait SpiController: Device {
    async fn spi_transfer(
        &self,
        tx_buffer: &[u8],
        rx_buffer: &mut [u8],
        config: &SpiConfig,
    ) -> Result<usize, Error>;
}
