3
3
#![ no_std]
4
4
#![ no_main]
5
5
6
- use aspeed_ddk:: gpio:: { gpiol, GpioExt } ;
7
6
use core:: sync:: atomic:: AtomicBool ;
8
7
// use core::arch::asm;
9
8
use aspeed_ddk:: uart:: { Config , UartController } ;
@@ -16,7 +15,6 @@ use aspeed_ddk::hace_controller::HaceController;
16
15
use aspeed_ddk:: rsa:: AspeedRsa ;
17
16
use aspeed_ddk:: spi;
18
17
use aspeed_ddk:: syscon:: { ClockId , ResetId , SysCon } ;
19
- use embedded_hal:: digital:: OutputPin ;
20
18
use fugit:: MillisDurationU32 as MilliSeconds ;
21
19
22
20
use aspeed_ddk:: tests:: functional:: ecdsa_test:: run_ecdsa_tests;
@@ -98,26 +96,6 @@ fn test_wdt(uart: &mut UartController<'_>) {
98
96
}
99
97
}
100
98
101
- fn test_gpio_flash_power ( uart : & mut UartController < ' _ > ) {
102
- let mut delay = DummyDelay { } ;
103
- if true {
104
- /* Older demo board required this */
105
- let peripherals = unsafe { Peripherals :: steal ( ) } ;
106
- let gpio = peripherals. gpio ;
107
- let gpiol = gpiol:: GPIOL :: new ( gpio) . split ( ) ;
108
- uart. write_all ( b"\r \n ####### GPIO test #######\r \n " )
109
- . unwrap ( ) ;
110
-
111
- let mut pl2 = gpiol. pl2 . into_push_pull_output ( ) ;
112
- pl2. set_high ( ) . unwrap ( ) ;
113
- uart. write_all ( b"\r \n GPIOL2 set high\r \n " ) . unwrap ( ) ;
114
- let mut pl3 = gpiol. pl3 . into_push_pull_output ( ) ;
115
- pl3. set_high ( ) . unwrap ( ) ;
116
- uart. write_all ( b"\r \n GPIOL3 set high\r \n " ) . unwrap ( ) ;
117
- delay. delay_ns ( 1_000_000 ) ;
118
- }
119
- }
120
-
121
99
#[ no_mangle]
122
100
pub static HALT : AtomicBool = AtomicBool :: new ( true ) ;
123
101
@@ -193,7 +171,7 @@ fn main() -> ! {
193
171
spi:: spitest:: test_fmc ( & mut uart_controller) ;
194
172
spi:: spitest:: test_spi ( & mut uart_controller) ;
195
173
196
- test_gpio_flash_power ( & mut uart_controller) ;
174
+ gpio_test :: test_gpio_flash_power ( & mut uart_controller) ;
197
175
spi:: spitest:: test_spi2 ( & mut uart_controller) ;
198
176
}
199
177
// Initialize the peripherals here if needed
0 commit comments