save
This commit is contained in:
@@ -7,7 +7,7 @@ STI_PARAMETER = {
|
||||
'STI_MODE': STI_WAVEFORM_POS,
|
||||
'PRECISION': STI_PRECISION_10,
|
||||
'STI_FREQ': 1000, # Hz
|
||||
'STI_PW': 200, # us
|
||||
'STI_PW': 100, # us
|
||||
'STI_PW_IPI': 0, # us
|
||||
'STI_NUM': STI_NUM_INFINITE,
|
||||
}
|
||||
@@ -17,3 +17,4 @@ if not validate_frequency_parameter(STI_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')
|
||||
|
||||
|
||||
+8
-8
@@ -106,15 +106,15 @@ static uint32_t cpu_frequency;
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
static uint32_t spin_counter = 0;
|
||||
static uint8_t spin_counter = 0;
|
||||
|
||||
#define headstage_spin_delay_us(us) \
|
||||
do { \
|
||||
uint8 __key = Hwi_disable(); \
|
||||
for (uint32_t _i = 0, _us = (us)*10; _i < _us; _i++) { \
|
||||
spin_counter = (spin_counter + 1) % 0xFFFF; \
|
||||
} \
|
||||
Hwi_restore(__key); \
|
||||
#define headstage_spin_delay_us(us) \
|
||||
do { \
|
||||
uint8 __key = Hwi_disable(); \
|
||||
for (uint16_t _i = (uint16_t)((us) * 5.15); _i; _i--) { \
|
||||
spin_counter = !(spin_counter); \
|
||||
} \
|
||||
Hwi_restore(__key); \
|
||||
} while (0)
|
||||
|
||||
/*======================
|
||||
|
||||
Reference in New Issue
Block a user