st7735_async_low/lib.rs
1// Copyright 2021 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// https://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15//! This crates aims to provide the native ST7735 commands in their original
16//! form, thus is a low-level library.
17//!
18//! A user of this crate should implement the write traits in [crate::spi], then
19//! wrap it with [Commands](crate::Commands) to use the commands. An example can
20//! be found at the [examples/stm32f3348_disco](https://github.com/jeru/st7735-async-low/tree/main/st7735_async_low/examples/stm32f3348_disco)
21//! directory of the crate.
22
23#![no_std]
24
25#[cfg(test)] extern crate std;
26#[cfg(test)] extern crate tokio;
27#[cfg(test)] extern crate mockall;
28
29pub mod adapters;
30mod command_structs;
31pub use command_structs::{
32 Colmod, ColorComponentOrder, ColumnOrder, Madctl, RowColumnSwap, RowOrder};
33mod commands;
34pub use commands::{Commands, RamWriter};
35pub mod spi;
36
37#[cfg(test)] pub mod testing_device;