veecle_freertos_sys/
error.rs

1//! Basic FreeRTOS errors.
2
3use core::fmt::Display;
4
5/// Basic error type for the library.
6#[expect(missing_docs)]
7#[derive(Copy, Clone, Debug, Eq, PartialEq)]
8pub enum FreeRtosError {
9    OutOfMemory,
10    QueueSendTimeout,
11    QueueReceiveTimeout,
12    MutexTimeout,
13    Timeout,
14    QueueFull,
15    StringConversionError,
16    TaskNotFound,
17    InvalidQueueSize,
18    ProcessorHasShutDown,
19    ZeroDuration,
20}
21
22impl core::error::Error for FreeRtosError {}
23
24impl Display for FreeRtosError {
25    fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
26        write!(f, "{self:?}")
27    }
28}