From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id A78161A0196 for ; Fri, 20 Nov 2015 12:00:49 +1100 (AEDT) Received: from localhost (172.110.7.206 [172.110.7.206]) by mx.zohomail.com with SMTPS id 1447981244213875.1112884994153; Thu, 19 Nov 2015 17:00:44 -0800 (PST) From: OpenBMC Patches To: openbmc@lists.ozlabs.org Cc: Ken Subject: [PATCH skeleton v3 12/19] LED test 2 Date: Thu, 19 Nov 2015 20:00:26 -0500 Message-Id: <1447981233-5573-13-git-send-email-openbmc-patches@stwcx.xyz> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1447981233-5573-1-git-send-email-openbmc-patches@stwcx.xyz> References: <1447981233-5573-1-git-send-email-openbmc-patches@stwcx.xyz> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2015 01:00:50 -0000 From: Ken --- bin/Barreleye.py | 5 +++++ objects/led_controller.c | 9 +++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bin/Barreleye.py b/bin/Barreleye.py index 9f3d1d1..14fe54a 100755 --- a/bin/Barreleye.py +++ b/bin/Barreleye.py @@ -61,6 +61,11 @@ ENTER_STATE_CALLBACK = { 'obj_name' : '/org/openbmc/control/led/BMC_READY', 'interface_name' : 'org.openbmc.Led', }, + 'setOn' : { + 'bus_name' : 'org.openbmc.control.led', + 'obj_name' : '/org/openbmc/control/led/BEEP', + 'interface_name' : 'org.openbmc.Led', + }, 'init' : { 'bus_name' : 'org.openbmc.control.Flash', 'obj_name' : '/org/openbmc/control/flash/bios', diff --git a/objects/led_controller.c b/objects/led_controller.c index 5bb4542..6f773c9 100755 --- a/objects/led_controller.c +++ b/objects/led_controller.c @@ -68,13 +68,14 @@ on_set_off (Led *led, return TRUE; } -int tmp=0; +//int tmp=0; void init_led(Led* led, GPIO* mygpio) { int rc = GPIO_OK; int i=5; - tmp++; +// tmp++; do { + sleep(2); uint8_t val; rc = gpio_open(mygpio); if (rc != GPIO_OK) { break; } @@ -89,8 +90,8 @@ void init_led(Led* led, GPIO* mygpio) i--; } while(i!=0); -if(tmp==3) - led_set_state(led,"off"); +//if(tmp==3) +// led_set_state(led,"off"); gpio_close(mygpio); if (rc != GPIO_OK) { -- 2.6.3