Merge pull request #324 from 9names/bsp_use_hal_entry_macro

Add reexport of rp2040::entry to BSPs
This commit is contained in:
9names 2022-05-31 23:41:45 +10:00 committed by GitHub
commit 895bae90b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
37 changed files with 37 additions and 37 deletions

View file

@ -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 _;

View file

@ -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 _;

View file

@ -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.

View file

@ -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)

View file

@ -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;

View file

@ -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.

View file

@ -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 _;

View file

@ -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.

View file

@ -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)

View file

@ -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;

View file

@ -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.

View file

@ -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 _;

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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;

View file

@ -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.

View file

@ -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;

View file

@ -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.

View file

@ -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;

View file

@ -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::*;

View file

@ -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};

View file

@ -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::*;

View file

@ -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};

View file

@ -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;

View file

@ -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::*;

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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;

View file

@ -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;

View file

@ -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)

View file

@ -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.

View file

@ -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},

View file

@ -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.

View file

@ -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::{

View file

@ -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.