mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2024-12-23 12:41:31 +11:00
Merge pull request #324 from 9names/bsp_use_hal_entry_macro
Add reexport of rp2040::entry to BSPs
This commit is contained in:
commit
895bae90b5
|
@ -4,6 +4,7 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_feather_rp2040::entry;
|
||||
use adafruit_feather_rp2040::{
|
||||
hal::{
|
||||
clocks::{init_clocks_and_plls, Clock},
|
||||
|
@ -13,7 +14,6 @@ use adafruit_feather_rp2040::{
|
|||
},
|
||||
Pins, XOSC_CRYSTAL_FREQ,
|
||||
};
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
use embedded_time::rate::*;
|
||||
use panic_halt as _;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_feather_rp2040::entry;
|
||||
use adafruit_feather_rp2040::{
|
||||
hal::{
|
||||
clocks::{init_clocks_and_plls, Clock},
|
||||
|
@ -18,7 +19,6 @@ use adafruit_feather_rp2040::{
|
|||
Pins, XOSC_CRYSTAL_FREQ,
|
||||
};
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use adafruit_itsy_bitsy_rp2040::entry;
|
||||
|
||||
// Ensure we halt the program on panic (if we don't mention this crate it won't
|
||||
// be linked)
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_itsy_bitsy_rp2040::entry;
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_kb2040::entry;
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
|
|
|
@ -4,7 +4,7 @@ pub use rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -5,7 +5,7 @@ pub use rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
// Adafruit macropad uses W25Q64JVxQ flash chip. Should work with BOOT_LOADER_W25Q080 (untested)
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_qt_py_rp2040::entry;
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use adafruit_trinkey_qt2040::entry;
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
use arrayvec::ArrayString;
|
||||
use core::fmt::Write;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_graphics::{
|
||||
mono_font::{ascii::FONT_10X20, MonoTextStyleBuilder},
|
||||
pixelcolor::Rgb565,
|
||||
|
@ -14,6 +13,7 @@ use embedded_hal::digital::v2::OutputPin;
|
|||
use embedded_time::rate::*;
|
||||
use hal::{adc::Adc, clocks::*, watchdog::Watchdog, Sio};
|
||||
use panic_halt as _;
|
||||
use pimoroni_pico_explorer::entry;
|
||||
use pimoroni_pico_explorer::{hal, pac, Button, PicoExplorer, XOSC_CRYSTAL_FREQ};
|
||||
|
||||
// See 4.9.5 from RP2040 datasheet
|
||||
|
|
|
@ -6,7 +6,7 @@ pub extern crate rp2040_hal as hal;
|
|||
extern crate cortex_m_rt;
|
||||
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use pimoroni_pico_lipo_16mb::entry;
|
||||
|
||||
// GPIO traits
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub use rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#![no_std]
|
||||
#![no_main]
|
||||
|
||||
use cortex_m_rt::entry;
|
||||
use bsp::entry;
|
||||
use defmt::*;
|
||||
use defmt_rtt as _;
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// GPIO traits
|
||||
use embedded_hal::digital::v2::OutputPin;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
use cortex_m::prelude::*;
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// GPIO traits
|
||||
use embedded_hal::digital::v2::{InputPin, OutputPin};
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
use core::fmt::Write;
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// Time handling traits:
|
||||
use embedded_time::duration::*;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
use core::fmt::Write as FmtWrite;
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// I2C HAL traits & Types.
|
||||
use embedded_hal::blocking::i2c::{Operation, Read, Transactional, Write};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// GPIO traits
|
||||
use embedded_hal::PwmPin;
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// info!() and error!() macros for printing information to the debug output
|
||||
use defmt::*;
|
||||
|
|
|
@ -31,7 +31,7 @@ use core::fmt::Write;
|
|||
use rp2040_hal::Clock;
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// Ensure we halt the program on panic (if we don't mention this crate it won't
|
||||
// be linked)
|
||||
|
|
|
@ -29,7 +29,7 @@ use embedded_time::fixed_point::FixedPoint;
|
|||
use rp2040_hal::Clock;
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// Ensure we halt the program on panic (if we don't mention this crate it won't
|
||||
// be linked)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// Ensure we halt the program on panic (if we don't mention this crate it won't
|
||||
// be linked)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// The macro for marking our interrupt functions
|
||||
use rp_pico::hal::pac::interrupt;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// The macro for marking our interrupt functions
|
||||
use rp_pico::hal::pac::interrupt;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#![no_main]
|
||||
|
||||
// The macro for our start-up function
|
||||
use cortex_m_rt::entry;
|
||||
use rp_pico::entry;
|
||||
|
||||
// Ensure we halt the program on panic (if we don't mention this crate it won't
|
||||
// be linked)
|
||||
|
|
|
@ -5,7 +5,7 @@ pub extern crate rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -7,11 +7,11 @@
|
|||
#![no_main]
|
||||
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
use smart_leds::{brightness, SmartLedsWrite, RGB8};
|
||||
use solderparty_rp2040_stamp::entry;
|
||||
use solderparty_rp2040_stamp::{
|
||||
hal::{
|
||||
clocks::{init_clocks_and_plls, Clock},
|
||||
|
|
|
@ -5,7 +5,7 @@ pub use rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
#![no_main]
|
||||
|
||||
use core::iter::once;
|
||||
use cortex_m_rt::entry;
|
||||
use embedded_hal::timer::CountDown;
|
||||
use embedded_time::duration::Extensions;
|
||||
use panic_halt as _;
|
||||
use sparkfun_pro_micro_rp2040::entry;
|
||||
|
||||
use smart_leds::{brightness, SmartLedsWrite, RGB8};
|
||||
use sparkfun_pro_micro_rp2040::{
|
||||
|
|
|
@ -4,7 +4,7 @@ pub use rp2040_hal as hal;
|
|||
#[cfg(feature = "rt")]
|
||||
extern crate cortex_m_rt;
|
||||
#[cfg(feature = "rt")]
|
||||
pub use cortex_m_rt::entry;
|
||||
pub use hal::entry;
|
||||
|
||||
/// The linker will place this boot block at the start of our program image. We
|
||||
/// need this to help the ROM bootloader get our code up and running.
|
||||
|
|
Loading…
Reference in a new issue