From 81bd4410efa86722661c809d9522f8c2fcc858ec Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 12 Aug 2019 13:52:54 +0200 Subject: kicad.dl: Adding rules for LEDs. --- src/ee/souffle/kicad.dl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/ee') 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 @@ -71,6 +71,28 @@ inductor(Part) :- add_fact(Part, "http://purl.org/ee/fact-type/ee-component-type", "http://purl.org/ee/part-type#inductor") :- 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 -- cgit v1.2.3