servicepoint-binding-c/servicepoint2/src/lib.rs

32 lines
978 B
Rust
Raw Normal View History

2024-05-11 23:28:08 +02:00
pub use crate::bit_vec::BitVec;
pub use crate::byte_grid::ByteGrid;
2024-05-12 17:15:30 +02:00
pub use crate::command::{Brightness, Command, Offset, Origin, Size};
2024-05-12 13:14:33 +02:00
pub use crate::command_code::CommandCode;
pub use crate::compression_code::CompressionCode;
2024-05-11 23:28:08 +02:00
pub use crate::connection::Connection;
pub use crate::packet::{Header, Packet, Payload};
pub use crate::pixel_grid::PixelGrid;
2024-05-09 23:30:18 +02:00
mod bit_vec;
2024-05-11 23:28:08 +02:00
mod byte_grid;
2024-05-10 00:53:12 +02:00
mod command;
2024-05-12 13:11:42 +02:00
mod command_code;
2024-05-11 23:16:41 +02:00
mod compression;
2024-05-12 13:14:33 +02:00
mod compression_code;
2024-05-11 23:28:08 +02:00
mod connection;
mod packet;
mod pixel_grid;
2024-05-09 23:30:18 +02:00
2024-05-12 01:30:55 +02:00
/// size of a single tile in one dimension
2024-05-09 23:30:18 +02:00
pub const TILE_SIZE: u16 = 8;
2024-05-12 01:30:55 +02:00
/// tile count in the x-direction
2024-05-09 23:30:18 +02:00
pub const TILE_WIDTH: u16 = 56;
2024-05-12 01:30:55 +02:00
/// tile count in the y-direction
2024-05-09 23:30:18 +02:00
pub const TILE_HEIGHT: u16 = 20;
2024-05-12 01:30:55 +02:00
/// screen width in pixels
2024-05-09 23:30:18 +02:00
pub const PIXEL_WIDTH: u16 = TILE_WIDTH * TILE_SIZE;
2024-05-12 01:30:55 +02:00
/// screen height in pixels
2024-05-09 23:30:18 +02:00
pub const PIXEL_HEIGHT: u16 = TILE_HEIGHT * TILE_SIZE;
2024-05-12 01:30:55 +02:00
/// pixel count on whole screen
2024-05-09 23:30:18 +02:00
pub const PIXEL_COUNT: usize = PIXEL_WIDTH as usize * PIXEL_HEIGHT as usize;