aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-08-12 13:52:54 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2019-08-12 13:52:54 +0200
commit81bd4410efa86722661c809d9522f8c2fcc858ec (patch)
treef99cd7069f6acb04a6ff3c53fedb38861248bab3
parent2204cf0d06111e0350cdbdabdda9eaa3df1e4047 (diff)
downloadee-python-81bd4410efa86722661c809d9522f8c2fcc858ec.tar.gz
ee-python-81bd4410efa86722661c809d9522f8c2fcc858ec.tar.bz2
ee-python-81bd4410efa86722661c809d9522f8c2fcc858ec.tar.xz
ee-python-81bd4410efa86722661c809d9522f8c2fcc858ec.zip
kicad.dl: Adding rules for LEDs.
-rw-r--r--src/ee/souffle/kicad.dl22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ee/souffle/kicad.dl b/src/ee/souffle/kicad.dl
index 3df801f..734811c 100644
--- a/src/ee/souffle/kicad.dl
+++ b/src/ee/souffle/kicad.dl
@@ -72,6 +72,28 @@ add_fact(Part, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.or
inductor(Part).
// ---------------------------------------------------------------------------------------------------------------------
+// LED rules
+
+.decl led_symbol(lib:symbol, name:symbol)
+
+.decl led_lib(lib:symbol)
+led_lib("led_SMD").
+
+.decl led(uri:symbol)
+
+led(Part) :-
+ fact(Part, "http://purl.org/ee/kicad-sch-fact-type#footprint-library", lib),
+ led_lib(lib).
+
+led(Part) :-
+ fact(Part, "http://purl.org/ee/kicad-sch-fact-type#symbol-library", lib),
+ fact(Part, "http://purl.org/ee/kicad-sch-fact-type#symbol-name", name),
+ led_symbol(lib, name).
+
+add_fact(Part, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.org/ee/part-type#led") :-
+ led(Part).
+
+// ---------------------------------------------------------------------------------------------------------------------
// Net tie rules
// Net ties and test points should probably not be marked as components to buy. Test points is possible to buy and