Skip to content

Commit d22cfe6

Browse files
committed
Restored display and hal
1 parent e3fc408 commit d22cfe6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

rust/app/src/display.rs.old renamed to rust/app/src/display.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* Code has been moved to https://github.com/lupyuen/piet-embedded/blob/master/piet-embedded-graphics/src/display.rs
12
use core::fmt::Write;
23
use arrayvec::ArrayString;
34
use embedded_graphics::{
@@ -24,6 +25,7 @@ use mynewt::{
2425
hw::hal,
2526
fill_zero,
2627
};
28+
*/
2729

2830
/* From PineTime Smart Watch wiki: https://wiki.pine64.org/index.php/PineTime
2931
Mynewt SPI port 0 connected to ST7789 display:
@@ -37,6 +39,7 @@ LCD_BACKLIGHT_{LOW,MID,HIGH} (P0.14, 22, 23) Backlight (active low)
3739
- LCD_DISPLAY_* is used to enable the backlight. Set at least one to low to see anything on the screen.
3840
- Use SPI at 8MHz (the fastest clock available on the nRF52832) because otherwise refreshing will be super slow. */
3941

42+
/*
4043
/// SPI settings for ST7789 display controller
4144
static mut SPI_SETTINGS: hal::hal_spi_settings = hal::hal_spi_settings {
4245
data_order: hal::HAL_SPI_MSB_FIRST as u8,
@@ -149,4 +152,5 @@ type Display = ST7735<mynewt::SPI, mynewt::GPIO, mynewt::GPIO>;
149152
150153
/// GPIO Pin for Display Backlight
151154
static mut BACKLIGHT_HIGH: mynewt::GPIO = fill_zero!(MynewtGPIO); // Will be created in `start_display()`
152-
type MynewtGPIO = mynewt::GPIO;
155+
type MynewtGPIO = mynewt::GPIO;
156+
*/

rust/app/src/mynewt_hal.rs.old renamed to rust/app/src/mynewt_hal.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* Code has been moved to `mynewt` library: rust/mynewt/src/hal.rs
12
use embedded_hal;
23
use mynewt::{
34
result::*,
@@ -126,3 +127,4 @@ pub struct MynewtGPIO {
126127
127128
/// Rust Embedded HAL interface for Mynewt Delay
128129
pub struct MynewtDelay {}
130+
*/

0 commit comments

Comments
 (0)