[PATCH skeleton v7 02/19] LED test 2
OpenBMC Patches
openbmc-patches at stwcx.xyz
Wed Dec 2 19:30:16 AEDT 2015
From: Ken <ken.sk.lai at mail.foxconn.com>
---
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 98d7321..783aa88 100755
--- a/bin/Barreleye.py
+++ b/bin/Barreleye.py
@@ -51,6 +51,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
More information about the openbmc
mailing list