aboutsummaryrefslogtreecommitdiff
path: root/examples/uart_interrupt.rs
diff options
context:
space:
mode:
authorFelipe Balbi <[email protected]>2025-11-07 10:06:55 -0800
committerFelipe Balbi <[email protected]>2025-11-07 10:06:55 -0800
commitcb2ac2790f4b037056f9571abeb4d62360199426 (patch)
treef9f163e4340d11ddc54c24ab8cf7624e83f1fd18 /examples/uart_interrupt.rs
parenta71eff2e1cea55b393e793c023b8e51e5cc369a1 (diff)
Reduce number of features
We don't need features for drivers that always exist. Signed-off-by: Felipe Balbi <[email protected]>
Diffstat (limited to 'examples/uart_interrupt.rs')
-rw-r--r--examples/uart_interrupt.rs21
1 files changed, 1 insertions, 20 deletions
diff --git a/examples/uart_interrupt.rs b/examples/uart_interrupt.rs
index 85743bb64..bd734f859 100644
--- a/examples/uart_interrupt.rs
+++ b/examples/uart_interrupt.rs
@@ -8,14 +8,8 @@ use hal::uart;
8 8
9mod common; 9mod common;
10 10
11#[cfg(all(feature = "defmt", feature = "defmt-rtt"))]
12use defmt_rtt as _;
13#[cfg(feature = "defmt")]
14use panic_probe as _;
15#[cfg(all(feature = "defmt", feature = "defmt-rtt"))]
16use rtt_target as _;
17
18use embassy_mcxa276::bind_interrupts; 11use embassy_mcxa276::bind_interrupts;
12use {defmt_rtt as _, panic_probe as _};
19 13
20// Bind LPUART2 interrupt to our handler 14// Bind LPUART2 interrupt to our handler
21bind_interrupts!(struct Irqs { 15bind_interrupts!(struct Irqs {
@@ -57,7 +51,6 @@ async fn main(_spawner: Spawner) {
57 uart.write_str_blocking("Type characters to echo them back.\r\n"); 51 uart.write_str_blocking("Type characters to echo them back.\r\n");
58 52
59 // Log using defmt if enabled 53 // Log using defmt if enabled
60 #[cfg(feature = "defmt")]
61 defmt::info!("UART interrupt echo demo starting..."); 54 defmt::info!("UART interrupt echo demo starting...");
62 55
63 loop { 56 loop {
@@ -74,15 +67,3 @@ async fn main(_spawner: Spawner) {
74 } 67 }
75 } 68 }
76} 69}
77
78#[cfg(feature = "defmt")]
79#[export_name = "_defmt_timestamp"]
80fn defmt_timestamp(_fmt: defmt::Formatter<'_>) {
81 // Return empty timestamp for now
82}
83
84#[cfg(not(feature = "defmt"))]
85#[panic_handler]
86fn panic(_info: &core::panic::PanicInfo) -> ! {
87 loop {}
88}