summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomain Porte <microjoe@microjoe.org>2020-03-01 09:30:36 +0100
committerRomain Porte <microjoe@microjoe.org>2020-03-01 09:30:36 +0100
commit9879ab1fff3416aa5388c7b847bc85ff3147a9f7 (patch)
tree03baac8ae2b1c61223f1114cf8e647fe5436422d
parent141c018a9f0252f48ac8e5e207721f4501f38979 (diff)
downloadcharlcd-9879ab1fff3416aa5388c7b847bc85ff3147a9f7.tar.gz
charlcd-9879ab1fff3416aa5388c7b847bc85ff3147a9f7.zip
custom_char: rename ARROW to TRIANGLE
-rw-r--r--examples/custom_char.rs8
-rw-r--r--src/custom_char.rs10
-rw-r--r--src/lib.rs2
3 files changed, 10 insertions, 10 deletions
diff --git a/examples/custom_char.rs b/examples/custom_char.rs
index 059f173..ce2f0cb 100644
--- a/examples/custom_char.rs
+++ b/examples/custom_char.rs
@@ -8,10 +8,10 @@ fn main() -> std::io::Result<()> {
// Alarm symbol
screen.custom_char(0, [0x04, 0x0E, 0x0E, 0x0E, 0x0E, 0x1F, 0x04, 0x00])?;
- screen.custom_char(1, custom_char::RIGHT_ARROW)?;
- screen.custom_char(2, custom_char::LEFT_ARROW)?;
- screen.custom_char(3, custom_char::UP_ARROW)?;
- screen.custom_char(4, custom_char::DOWN_ARROW)?;
+ screen.custom_char(1, custom_char::RIGHT_TRIANGLE)?;
+ screen.custom_char(2, custom_char::LEFT_TRIANGLE)?;
+ screen.custom_char(3, custom_char::UP_TRIANGLE)?;
+ screen.custom_char(4, custom_char::DOWN_TRIANGLE)?;
screen.clear()?;
screen.write(b"\x00 Alarm 10:00\n")?;
diff --git a/src/custom_char.rs b/src/custom_char.rs
index cd43cf7..f03e5ba 100644
--- a/src/custom_char.rs
+++ b/src/custom_char.rs
@@ -16,7 +16,7 @@
//! ```
//! /// ▸
//! #[cfg_attr(rustfmt, rustfmt_skip)]
-//! pub const RIGHT_ARROW: [u8; 8] = [
+//! pub const RIGHT_TRIANGLE: [u8; 8] = [
//! 0b00000,
//! 0b01000,
//! 0b01100,
@@ -60,7 +60,7 @@ pub const fn mirror_y(src: [u8; 8]) -> [u8; 8] {
/// ▸
#[cfg_attr(rustfmt, rustfmt_skip)]
-pub const RIGHT_ARROW: [u8; 8] = [
+pub const RIGHT_TRIANGLE: [u8; 8] = [
0b00000,
0b01000,
0b01100,
@@ -72,11 +72,11 @@ pub const RIGHT_ARROW: [u8; 8] = [
];
/// ◂
-pub const LEFT_ARROW: [u8; 8] = mirror_x(RIGHT_ARROW);
+pub const LEFT_TRIANGLE: [u8; 8] = mirror_x(RIGHT_TRIANGLE);
/// ▴
#[cfg_attr(rustfmt, rustfmt_skip)]
-pub const UP_ARROW: [u8; 8] = [
+pub const UP_TRIANGLE: [u8; 8] = [
0b00000,
0b00000,
0b00100,
@@ -88,4 +88,4 @@ pub const UP_ARROW: [u8; 8] = [
];
/// ▾
-pub const DOWN_ARROW: [u8; 8] = mirror_y(UP_ARROW);
+pub const DOWN_TRIANGLE: [u8; 8] = mirror_y(UP_TRIANGLE);
diff --git a/src/lib.rs b/src/lib.rs
index 5540505..17738a3 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -740,7 +740,7 @@ where
/// screen.reinit()?;
///
/// // Store the custom ▸ character in the screen memory, code 0
- /// screen.custom_char(0, custom_char::RIGHT_ARROW)?;
+ /// screen.custom_char(0, custom_char::RIGHT_TRIANGLE)?;
///
/// // Print custom character from screen memory, code 0
/// screen.write(b"\x00")?;