Skip to content

Commit

Permalink
refactor: update demo assets dir
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Jul 11, 2024
1 parent e560f13 commit 54633ee
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 32 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
rustup component add rust-src
rustup target add riscv32imafc-unknown-none-elf
- name: Build Only
run: for d in $(ls -1 ./examples); do
(cd ./examples/$d && cargo build --release)
run: |
for d in $(ls -1 ./examples); do
if [ -f "./examples/$d/Cargo.toml" ]; then
(cd ./examples/$d && cargo build --release)
fi
done
10 changes: 0 additions & 10 deletions examples/hpm5300evk/src/bin/BANNER

This file was deleted.

2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/blocking_uart_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use hpm_hal::uart::UartTx;
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _, riscv_rt as _};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[hal::entry]
fn main() -> ! {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/embassy_tmpl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use hpm_hal::mode::Blocking;
use {defmt_rtt as _, hpm_hal as hal};

const BOARD_NAME: &str = "HPM5300EVK";
const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[embassy_executor::task]
async fn blink(pin: AnyPin) {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/i2c_oled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use hal::mode::Blocking;
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, riscv_rt as _};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

pub mod consts {
pub const PRIMARY_ADDRESS: u8 = 0x3C;
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/pll_setting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use hpm_hal::time::Hertz;
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, panic_halt as _, riscv_rt as _};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[hal::entry]
fn main() -> ! {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/raw_pwm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use hpm_hal::pac::{iomux, pins};
use {defmt_rtt as _, hpm_hal as hal};

const BOARD_NAME: &str = "HPM5300EVK";
const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

macro_rules! println {
($($arg:tt)*) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/tsns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use hpm_hal::time::Hertz;
use riscv::delay::McycleDelay;
use {defmt_rtt as _, hpm_hal as hal, riscv_rt as _};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[hal::entry]
fn main() -> ! {
Expand Down
2 changes: 1 addition & 1 deletion examples/hpm5300evk/src/bin/uart_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bind_interrupts!(struct Irqs {
UART0 => hal::uart::InterruptHandler<peripherals::UART0>;
});

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[embassy_executor::task(pool_size = 2)]
async fn blink(pin: AnyPin) {
Expand Down
10 changes: 0 additions & 10 deletions examples/hpm6e00evk/src/bin/BANNER

This file was deleted.

2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/embassy_femc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use hal::mode::Blocking;
use hal::pac;
use {defmt_rtt as _, hpm_hal as hal};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

static mut UART: Option<hal::uart::Uart<'static, Blocking>> = None;

Expand Down
2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/raw_pwm_rgbled.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use hpm_hal::pac::pwm::vals;
use hpm_hal::pac::{iomux, pins};
use {defmt_rtt as _, hpm_hal as hal};

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

static mut UART: Option<hal::uart::UartTx<'static, Blocking>> = None;

Expand Down
2 changes: 1 addition & 1 deletion examples/hpm6e00evk/src/bin/uart_async.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bind_interrupts!(struct Irqs {
UART0 => hal::uart::InterruptHandler<peripherals::UART0>;
});

const BANNER: &str = include_str!("./BANNER");
const BANNER: &str = include_str!("../../../assets/BANNER");

#[embassy_executor::task(pool_size = 3)]
async fn blink(pin: AnyPin, interval_ms: u32) {
Expand Down

0 comments on commit 54633ee

Please sign in to comment.