Skip to content

Commit

Permalink
add port and pin to panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
lzrd committed Feb 9, 2025
1 parent 12a6cf8 commit 2c7c981
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/lpc55pins/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ impl PinConfig {
fn get_pint_slot(&self, used: &mut u32) -> Option<PintSlot> {
if let Some(slot_number) = self.pint {
if self.pin.port > 1 || self.pin.pin > 32 {
panic!("Invalid gpio pin for interrupt");
panic!(
"Invalid gpio pin for interrupt: port={}, pin={}",
self.pin.port, self.pin.pin
);
}
if let Ok(pint_slot) = PintSlot::try_from(slot_number) {
let mask = pint_slot.mask();
Expand Down

0 comments on commit 2c7c981

Please sign in to comment.