Skip to content
Snippets Groups Projects
Commit 37ce5422 authored by Kenneth Hiemstra's avatar Kenneth Hiemstra
Browse files

added LED test

parent edfdaed2
Branches
Tags
No related merge requests found
...@@ -62,6 +62,7 @@ import pi_eth ...@@ -62,6 +62,7 @@ import pi_eth
import pi_bsn_monitor import pi_bsn_monitor
import pi_diag_block_gen import pi_diag_block_gen
import pi_diag_data_buffer import pi_diag_data_buffer
import pi_debug_wave
from tools import * from tools import *
from common import * from common import *
...@@ -438,6 +439,26 @@ def test_flash(tc,io,cmd): ...@@ -438,6 +439,26 @@ def test_flash(tc,io,cmd):
tc.append_log(3, '') tc.append_log(3, '')
def led(tc,dw,led,text):
tc.append_log(3, text)
dw.set_led(led)
tc.sleep(1.0)
def test_leds(tc,io,cmd):
tc.set_section_id('LED test - ')
tc.append_log(3, '>>>')
tc.append_log(1, '>>> %s' % help_text(tc,io,cmd))
tc.append_log(3, '>>>')
dw = pi_debug_wave.PiDebugWave(tc, io)
led(tc,dw,'off', '')
led(tc,dw,'red', 'RED on')
led(tc,dw,'off', 'RED off')
led(tc,dw,'green','GREEN on')
led(tc,dw,'off', 'GREEN off')
led(tc,dw,'both', 'ORANGE (RED+GREEN) on')
led(tc,dw,'off', 'ORANGE (RED+GREEN) off')
tc.append_log(3, '')
def sleep(tc,io,cmd): def sleep(tc,io,cmd):
tc.set_section_id('%s - ' % cmd) tc.set_section_id('%s - ' % cmd)
...@@ -458,6 +479,7 @@ Cmd['REGMAP'] = (read_regmap, 'using pi_system_info to read register info (acc ...@@ -458,6 +479,7 @@ Cmd['REGMAP'] = (read_regmap, 'using pi_system_info to read register info (acc
Cmd['INFO'] = (test_info, 'using pi_system_info to read system info (access PIO_SYSTEM_INFO)','(-s for expected design_name)') Cmd['INFO'] = (test_info, 'using pi_system_info to read system info (access PIO_SYSTEM_INFO)','(-s for expected design_name)')
Cmd['FLASH'] = (test_flash, 'using pi_epcs to program/verify flash','(-s for .rbf file)') Cmd['FLASH'] = (test_flash, 'using pi_epcs to program/verify flash','(-s for .rbf file)')
Cmd['SENSORS'] = (test_sensors, 'using pi_unb_sens to readout sensors (access REG_UNB_SENS)','') Cmd['SENSORS'] = (test_sensors, 'using pi_unb_sens to readout sensors (access REG_UNB_SENS)','')
Cmd['LED'] = (test_leds, 'using pi_debug_wave to set LEDs (access PIO_DEBUG_WAVE)','')
Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (access PIO_PPS)','') Cmd['PPSH'] = (test_ppsh, 'using pi_ppsh to read PPSH capture count (access PIO_PPS)','')
Cmd['ETH'] = (test_eth, 'using pi_eth to read eth status','') Cmd['ETH'] = (test_eth, 'using pi_eth to read eth status','')
Cmd['REMU'] = (test_remu, 'using pi_remu to load user image (access REG_REMU)','') Cmd['REMU'] = (test_remu, 'using pi_remu to load user image (access REG_REMU)','')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment