20 lines
643 B
Python
20 lines
643 B
Python
from devlib.util import print_instruction
|
|
from sti.util import *
|
|
|
|
STI_PARAMETER = {
|
|
'CURRENT': 10, # uA
|
|
'CHANNEL': CHANNEL_STI_0,
|
|
'STI_MODE': STI_WAVEFORM_POS,
|
|
'PRECISION': STI_PRECISION_10,
|
|
'STI_FREQ': 1000, # Hz
|
|
'STI_PW': 200, # us
|
|
'STI_PW_IPI': 0, # us
|
|
'STI_NUM': STI_NUM_INFINITE,
|
|
}
|
|
|
|
if not validate_frequency_parameter(STI_PARAMETER):
|
|
print('invalidate parameter')
|
|
else:
|
|
print_instruction(STI_INSTRUCTION['GLOBAL'], STI_PARAMETER, append_ris_type=False, c_style_uint8_array='ins')
|
|
print_instruction(STI_INSTRUCTION['LOCAL'], STI_PARAMETER, append_ris_type=False, c_style_uint8_array='ins')
|