use std::{
    fs::File,
    io,
    os::fd::{AsRawFd, RawFd},
    path::Path,
};

use crate::sys::{SpiConfig, SpiDevice};

pub struct SpiDeviceImpl {
    file: File,
}

impl SpiDevice for SpiDeviceImpl {
    fn open<P: AsRef<Path>>(_device: P, _config: &SpiConfig) -> io::Result<Self> {
        todo!()
    }

    fn set_config(&mut self, _config: &SpiConfig) -> io::Result<()> {
        todo!()
    }

    fn transfer(&mut self, _tx: &[u8], _rx: &mut [u8]) -> io::Result<usize> {
        todo!()
    }
}

impl AsRawFd for SpiDeviceImpl {
    fn as_raw_fd(&self) -> RawFd {
        self.file.as_raw_fd()
    }
}
