Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/SantaClaas/crustpoint.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182use embassy_time::TimeoutError;use embedded_hal::spi::Error;use esp_hal::spi;
#[derive(Debug, thiserror::Error, defmt::Format)]pub(crate) enum CreateError { #[error("Failed to create SPI bus")] SpiBus(#[from] spi::master::ConfigError),}
#[derive(Debug, thiserror::Error)]#[error("Failed to send command")]pub(crate) struct SendCommandError<E: Error>(#[from] pub(super) E);
#[derive(Debug, thiserror::Error)]#[error("Failed to send data")]pub(crate) struct SendDataError<E: Error>(#[from] pub(super) E);
#[derive(Debug, thiserror::Error)]pub(crate) enum SetRamAreaError<E: Error> { #[error("Failed to send command")] SendCommand(#[from] SendCommandError<E>), #[error("Failed to send data")] SendData(#[from] SendDataError<E>),}
#[derive(Debug, thiserror::Error)]pub(crate) enum InitializeControllerError<E: Error> { #[error("Failed to send command")] SendCommand(#[from] SendCommandError<E>), #[error("Failed to send data")] SendData(#[from] SendDataError<E>), #[error("Timed out waiting for busy")] WaitForIdle(#[from] WaitForIdleTimeoutError), #[error("Failed to set RAM area")] SetRamArea(#[from] SetRamAreaError<E>),}
#[derive(Debug, thiserror::Error, defmt::Format)]#[error("Timeout waiting for busy")]pub(crate) struct WaitForIdleTimeoutError(pub(super) TimeoutError);
#[derive(Debug, thiserror::Error)]pub(crate) enum InitializationError<E: Error> { #[error("Failed to create e-ink display driver instance")] Create(#[from] CreateError), #[error("Failed to initialize e-ink display controller")] InitializeController(#[from] InitializeControllerError<E>),}
#[derive(Debug, thiserror::Error)]pub(crate) enum RefreshError<E: Error> { #[error("Failed to send command")] SendCommand(#[from] SendCommandError<E>), #[error("Failed to send data")] SendData(#[from] SendDataError<E>), #[error("Failed to wait for busy")] WaitForIdle(#[from] WaitForIdleTimeoutError),}
#[derive(Debug, thiserror::Error)]pub(crate) enum DisplayError<E: Error> { #[error("Failed to set RAM area")] SetRamArea(#[from] SetRamAreaError<E>), #[error("Failed to send command")] SendCommand(#[from] SendCommandError<E>), #[error("Failed to send data")] SendData(#[from] SendDataError<E>), #[error("Failed to refresh display")] Refresh(#[from] RefreshError<E>),}
#[derive(Debug, thiserror::Error)]pub(crate) enum EnterDeepSleepError<E: Error> { #[error("Failed to send command")] SendCommand(#[from] SendCommandError<E>), #[error("Failed to send data")] SendData(#[from] SendDataError<E>), #[error("Failed to wait for busy")] WaitForIdle(#[from] WaitForIdleTimeoutError),}