Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reexport of rp2040::entry to BSPs #324

Merged
merged 2 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![no_std]
#![no_main]

use adafruit_feather_rp2040::entry;
use adafruit_feather_rp2040::{
hal::{
clocks::{init_clocks_and_plls, Clock},
Expand All @@ -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 _;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#![no_std]
#![no_main]

use adafruit_feather_rp2040::entry;
use adafruit_feather_rp2040::{
hal::{
clocks::{init_clocks_and_plls, Clock},
Expand All @@ -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 _;
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-feather-rp2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-itsy-bitsy-rp2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-kb2040/examples/adafruit_kb2040_rainbow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 _;
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-kb2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-macropad/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-qt-py-rp2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 _;
Expand Down
2 changes: 1 addition & 1 deletion boards/adafruit-trinkey-qt2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-pico-explorer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-pico-lipo-16mb/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-tiny2040/examples/tiny2040_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/pimoroni-tiny2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_countdown_blinky.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_gpio_in_out.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_i2c_oled_display_ssd1306.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_i2c_pio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_pwm_blink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_spi_sd_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_uart_irq_buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_uart_irq_echo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_usb_serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_usb_serial_interrupt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_usb_twitchy_mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/examples/pico_ws2812_led.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion boards/rp-pico/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
2 changes: 1 addition & 1 deletion boards/solderparty-rp2040-stamp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down
2 changes: 1 addition & 1 deletion boards/sparkfun-pro-micro-rp2040/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down