Skip to content

Commit 888ec98

Browse files
authored
Support Digispark dtiny AVR framework (#190)
1 parent 61b18fe commit 888ec98

2 files changed

Lines changed: 43 additions & 0 deletions

File tree

crates/fbuild-packages/assets/avr_frameworks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@
2525
"checksum": null,
2626
"validation_path": "cores/tinymodern/Arduino.h"
2727
},
28+
"dtiny": {
29+
"name": "digistump-avr-core",
30+
"github": "ArminJo/DigistumpArduino",
31+
"version": "1.7.2",
32+
"tag_prefix": "",
33+
"checksum": null,
34+
"validation_path": "cores/tiny/Arduino.h",
35+
"core_dir": "tiny"
36+
},
37+
"pro": {
38+
"name": "digistump-avr-core",
39+
"github": "ArminJo/DigistumpArduino",
40+
"version": "1.7.2",
41+
"tag_prefix": "",
42+
"checksum": null,
43+
"validation_path": "cores/pro/Arduino.h",
44+
"core_dir": "pro"
45+
},
2846
"MiniCore": {
2947
"name": "minicore",
3048
"github": "MCUdude/MiniCore",

crates/fbuild-packages/src/library/avr_framework.rs

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,4 +372,29 @@ mod tests {
372372
assert_eq!(entry.name, "arduino-megaavr-core");
373373
assert_eq!(entry.core_dir.as_deref(), Some("arduino"));
374374
}
375+
376+
#[test]
377+
fn test_digispark_dtiny_registered() {
378+
let registry = load_registry();
379+
assert!(
380+
registry.contains_key("dtiny"),
381+
"dtiny must be registered for Digistump/Digispark boards"
382+
);
383+
}
384+
385+
#[test]
386+
fn test_digispark_dtiny_lookup() {
387+
let entry = lookup_entry("dtiny").unwrap();
388+
assert!(entry.github.contains("DigistumpArduino"));
389+
assert_eq!(entry.name, "digistump-avr-core");
390+
assert_eq!(entry.core_dir.as_deref(), Some("tiny"));
391+
}
392+
393+
#[test]
394+
fn test_digispark_pro_lookup() {
395+
let entry = lookup_entry("pro").unwrap();
396+
assert!(entry.github.contains("DigistumpArduino"));
397+
assert_eq!(entry.name, "digistump-avr-core");
398+
assert_eq!(entry.core_dir.as_deref(), Some("pro"));
399+
}
375400
}

0 commit comments

Comments
 (0)