ID=INSN_CONFIG_DISARM: Disarm a device (such as a counter) and force it to stop.
[0] - ID
+
+ID=INSN_CONFIG_RESET_COUNT: Resets a counter's count to zero. On NI general-purpose
+ counters, it also has the side-effect of disarming the counter.
+ [0] - ID
+
+ID=INSN_CONFIG_SET_COUNTER_MODE: Set a counter's mode. The specific meaning of the
+ the mode field is hardware-dependent.
+ [0] - ID
+ [1] - mode
static const unsigned mode_reg_direct_mask = NI_GPCT_GATE_ON_BOTH_EDGES_BIT |
NI_GPCT_EDGE_GATE_MODE_MASK | NI_GPCT_STOP_MODE_MASK |
NI_GPCT_OUTPUT_MODE_MASK | NI_GPCT_HARDWARE_DISARM_MASK |
- NI_GPCT_LOADING_ON_TC_BIT | NI_GPCT_LOADING_ON_GATE_BIT;
+ NI_GPCT_LOADING_ON_TC_BIT | NI_GPCT_LOADING_ON_GATE_BIT |
+ NI_GPCT_LOAD_B_SELECT_BIT;
switch(mode & NI_GPCT_RELOAD_SOURCE_MASK)
{
{
switch(start_trigger)
{
- case NI_GPCT_ARM_IMMEDIATE_START:
+ case NI_GPCT_ARM_IMMEDIATE:
command_bits |= Gi_Arm_Bit;
break;
- case NI_GPCT_ARM_PAIRED_IMMEDIATE_START:
+ case NI_GPCT_ARM_PAIRED_IMMEDIATE:
command_bits |= Gi_Arm_Bit | Gi_Arm_Copy_Bit;
break;
default:
const unsigned counting_mode_reg = NITIO_Gi_Counting_Mode_Reg(counter->counter_index);
switch(start_trigger)
{
- case NI_GPCT_ARM_IMMEDIATE_START:
- case NI_GPCT_ARM_PAIRED_IMMEDIATE_START:
+ case NI_GPCT_ARM_IMMEDIATE:
+ case NI_GPCT_ARM_PAIRED_IMMEDIATE:
counter->regs[counting_mode_reg] &= ~Gi_HW_Arm_Enable_Bit;
break;
default:
NI_GPCT_STOP_ON_GATE_BITS = 0x00,
NI_GPCT_STOP_ON_GATE_OR_TC_BITS = 0x20,
NI_GPCT_STOP_ON_GATE_OR_SECOND_TC_BITS = 0x40,
+ NI_GPCT_LOAD_B_SELECT_BIT = 0x80,
NI_GPCT_OUTPUT_MODE_MASK = 0x300,
NI_GPCT_OUTPUT_TC_PULSE_BITS = 0x100,
NI_GPCT_OUTPUT_TC_TOGGLE_BITS = 0x200,
INSN_CONFIG_ARM */
enum ni_gpct_arm_source
{
- NI_GPCT_ARM_IMMEDIATE_START = 0x0,
- NI_GPCT_ARM_PAIRED_IMMEDIATE_START = 0x1, /* Start both the counter and the adjacent paired counter simultaneously */
- /* NI doesn't document bits for selecting hardware start triggers. If
+ NI_GPCT_ARM_IMMEDIATE = 0x0,
+ NI_GPCT_ARM_PAIRED_IMMEDIATE = 0x1, /* Start both the counter and the adjacent paired counter simultaneously */
+ /* NI doesn't document bits for selecting hardware arm triggers. If
the NI_GPCT_ARM_UNKNOWN bit is set, we will pass the least significant
bits (3 bits for 660x or 5 bits for m-series) through to the hardware.
This will at least allow someone to figure out what the bits do later.*/