Skip to content

Commit b35e11e

Browse files
committed
wip: Drivers hacks for debugging
Make some small changes to try testing this on stm32. This change can be discarded. Signed-off-by: David Brown <[email protected]>
1 parent bc61639 commit b35e11e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tests/drivers/gpio-async/prj.conf

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,8 @@ CONFIG_RUST_ALLOC=y
1313
CONFIG_GPIO=y
1414
CONFIG_GPIO_ENABLE_DISABLE_INTERRUPT=y
1515

16-
CONFIG_LOG_BACKEND_RTT=n
16+
# CONFIG_LOG_BACKEND_RTT=n
17+
18+
CONFIG_UART_CONSOLE=n
19+
CONFIG_RTT_CONSOLE=y
20+
CONFIG_USE_SEGGER_RTT=y

tests/drivers/gpio-async/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,18 @@ async fn main(spawner: Spawner) {
3535
info!("Hello world");
3636
let _ = spawner;
3737

38+
/*
3839
let mut col0 = zephyr::devicetree::labels::col0::get_instance().unwrap();
3940
let mut row0 = zephyr::devicetree::labels::row0::get_instance().unwrap();
41+
*/
42+
let mut row0 = zephyr::devicetree::aliases::sw0::get_instance().unwrap();
4043
let mut gpio_token = unsafe { zephyr::device::gpio::GpioToken::get_instance().unwrap() };
4144

4245
unsafe {
46+
/*
4347
col0.configure(&mut gpio_token, GPIO_OUTPUT_ACTIVE);
4448
col0.set(&mut gpio_token, true);
49+
*/
4550
row0.configure(&mut gpio_token, GPIO_INPUT | GPIO_PULL_DOWN);
4651
}
4752

0 commit comments

Comments
 (0)