firmware for my Touchscreen E-Paper Input Module for Framework Laptop 16
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

at f6676c82689a4e7314b93c8eb98ddd08152fe708 104 lines 1.9 kB view raw
1#![no_std] 2 3pub extern crate rp2040_hal as hal; 4 5pub use hal::pac; 6 7#[cfg(feature = "rt")] 8pub use rp2040_hal::entry; 9 10#[cfg(feature = "boot2")] 11#[unsafe(link_section = ".boot2")] 12#[unsafe(no_mangle)] 13#[used] 14pub static BOOT2_FIRMWARE: [u8; 256] = rp2040_boot2::BOOT_LOADER_W25Q080; 15 16hal::bsp_pins! { 17 Gpio2 { 18 name: epd_touch_int, 19 aliases: { 20 FunctionSioInput, PullUp: EpdTouchInt 21 } 22 }, 23 24 Gpio3 { 25 name: epd_touch_rst, 26 aliases: { 27 FunctionSioOutput, PullNone: EpdTouchReset 28 } 29 }, 30 31 Gpio4 { 32 name: i2c_sda, 33 aliases: { 34 FunctionI2C, PullUp: I2CSda 35 } 36 } 37 38 Gpio5 { 39 name: i2c_scl, 40 aliases: { 41 FunctionI2C, PullUp: I2CScl 42 } 43 } 44 45 Gpio6 { 46 name: epd_pwr_sw, 47 aliases: { 48 FunctionSioOutput, PullNone: EpdPowerSwitch 49 } 50 }, 51 52 Gpio8 { 53 name: epd_busy, 54 aliases: { 55 FunctionSioInput, PullUp: EpdBusy 56 } 57 }, 58 59 Gpio9 { 60 name: epd_rst, 61 aliases: { 62 FunctionSioOutput, PullNone: EpdReset 63 } 64 }, 65 66 Gpio10 { 67 name: epd_dc, 68 aliases: { 69 FunctionSioOutput, PullNone: EpdDc 70 } 71 }, 72 73 Gpio11 { 74 name: spi3_epd_sda, 75 aliases: { 76 FunctionSioOutput, PullNone: EpdSdaWrite, 77 FunctionSioInput, PullNone: EpdSdaRead 78 } 79 } 80 81 Gpio13 { 82 name: spi3_epd_cs, 83 aliases: { 84 FunctionSioOutput, PullNone: EpdCs 85 } 86 } 87 88 Gpio14 { 89 name: spi3_epd_sck, 90 aliases: { 91 FunctionSioOutput, PullNone: EpdSck, 92 FunctionPio0, PullNone: EpdSckPio 93 } 94 } 95 96 Gpio25 { 97 name: laptop_sleep, 98 aliases: { 99 FunctionSioInput, PullUp: LaptopSleep 100 } 101 }, 102} 103 104pub const XOSC_CRYSTAL_FREQ: u32 = 12_000_000;