Update all BSP examples to use the BSP's re-exported entry macro

This commit is contained in:
9names 2022-04-10 21:54:56 +10:00
parent f38847a318
commit 12cbab967c
25 changed files with 25 additions and 25 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

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

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

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

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

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

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

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

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

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

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