Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ni_tio_internal.h File Reference
#include "ni_tio.h"

Go to the source code of this file.

Macros

#define Gi_Up_Down_Shift   5
 
#define Gi_Index_Phase_Bitshift   5
 
#define Gi_HW_Arm_Select_Shift   8
 
#define Gi_Source_Select_Shift   2
 
#define Gi_Gate_Select_Shift   7
 
#define Gi_Second_Gate_Select_Shift   7
 

Enumerations

enum  Gi_Auto_Increment_Reg_Bits { Gi_Auto_Increment_Mask = 0xff }
 
enum  Gi_Command_Reg_Bits {
  Gi_Arm_Bit = 0x1, Gi_Save_Trace_Bit = 0x2, Gi_Load_Bit = 0x4, Gi_Disarm_Bit = 0x10,
  Gi_Up_Down_Mask = 0x3 << Gi_Up_Down_Shift, Gi_Always_Down_Bits = 0x0 << Gi_Up_Down_Shift, Gi_Always_Up_Bits = 0x1 << Gi_Up_Down_Shift, Gi_Up_Down_Hardware_IO_Bits = 0x2 << Gi_Up_Down_Shift,
  Gi_Up_Down_Hardware_Gate_Bits = 0x3 << Gi_Up_Down_Shift, Gi_Write_Switch_Bit = 0x80, Gi_Synchronize_Gate_Bit = 0x100, Gi_Little_Big_Endian_Bit = 0x200,
  Gi_Bank_Switch_Start_Bit = 0x400, Gi_Bank_Switch_Mode_Bit = 0x800, Gi_Bank_Switch_Enable_Bit = 0x1000, Gi_Arm_Copy_Bit = 0x2000,
  Gi_Save_Trace_Copy_Bit = 0x4000, Gi_Disarm_Copy_Bit = 0x8000
}
 
enum  Gi_Counting_Mode_Reg_Bits {
  Gi_Counting_Mode_Mask = 0x7, Gi_Counting_Mode_Normal_Bits = 0x0, Gi_Counting_Mode_QuadratureX1_Bits = 0x1, Gi_Counting_Mode_QuadratureX2_Bits = 0x2,
  Gi_Counting_Mode_QuadratureX4_Bits = 0x3, Gi_Counting_Mode_Two_Pulse_Bits = 0x4, Gi_Counting_Mode_Sync_Source_Bits = 0x6, Gi_Index_Mode_Bit = 0x10,
  Gi_Index_Phase_Mask = 0x3 << Gi_Index_Phase_Bitshift, Gi_Index_Phase_LowA_LowB = 0x0 << Gi_Index_Phase_Bitshift, Gi_Index_Phase_LowA_HighB = 0x1 << Gi_Index_Phase_Bitshift, Gi_Index_Phase_HighA_LowB = 0x2 << Gi_Index_Phase_Bitshift,
  Gi_Index_Phase_HighA_HighB = 0x3 << Gi_Index_Phase_Bitshift, Gi_HW_Arm_Enable_Bit = 0x80, Gi_660x_HW_Arm_Select_Mask = 0x7 << Gi_HW_Arm_Select_Shift, Gi_660x_Prescale_X8_Bit = 0x1000,
  Gi_M_Series_Prescale_X8_Bit = 0x2000, Gi_M_Series_HW_Arm_Select_Mask = 0x1f << Gi_HW_Arm_Select_Shift, Gi_660x_Alternate_Sync_Bit = 0x2000, Gi_M_Series_Alternate_Sync_Bit = 0x4000,
  Gi_660x_Prescale_X2_Bit = 0x4000, Gi_M_Series_Prescale_X2_Bit = 0x8000
}
 
enum  Gi_Input_Select_Bits {
  Gi_Read_Acknowledges_Irq = 0x1, Gi_Write_Acknowledges_Irq = 0x2, Gi_Source_Select_Mask = 0x7c, Gi_Gate_Select_Mask = 0x1f << Gi_Gate_Select_Shift,
  Gi_Gate_Select_Load_Source_Bit = 0x1000, Gi_Or_Gate_Bit = 0x2000, Gi_Output_Polarity_Bit = 0x4000, Gi_Source_Polarity_Bit = 0x8000
}
 
enum  Gi_Mode_Bits {
  Gi_Gating_Mode_Mask = 0x3, Gi_Gating_Disabled_Bits = 0x0, Gi_Level_Gating_Bits = 0x1, Gi_Rising_Edge_Gating_Bits = 0x2,
  Gi_Falling_Edge_Gating_Bits = 0x3, Gi_Gate_On_Both_Edges_Bit = 0x4, Gi_Trigger_Mode_for_Edge_Gate_Mask = 0x18, Gi_Edge_Gate_Starts_Stops_Bits = 0x0,
  Gi_Edge_Gate_Stops_Starts_Bits = 0x8, Gi_Edge_Gate_Starts_Bits = 0x10, Gi_Edge_Gate_No_Starts_or_Stops_Bits = 0x18, Gi_Stop_Mode_Mask = 0x60,
  Gi_Stop_on_Gate_Bits = 0x00, Gi_Stop_on_Gate_or_TC_Bits = 0x20, Gi_Stop_on_Gate_or_Second_TC_Bits = 0x40, Gi_Load_Source_Select_Bit = 0x80,
  Gi_Output_Mode_Mask = 0x300, Gi_Output_TC_Pulse_Bits = 0x100, Gi_Output_TC_Toggle_Bits = 0x200, Gi_Output_TC_or_Gate_Toggle_Bits = 0x300,
  Gi_Counting_Once_Mask = 0xc00, Gi_No_Hardware_Disarm_Bits = 0x000, Gi_Disarm_at_TC_Bits = 0x400, Gi_Disarm_at_Gate_Bits = 0x800,
  Gi_Disarm_at_TC_or_Gate_Bits = 0xc00, Gi_Loading_On_TC_Bit = 0x1000, Gi_Gate_Polarity_Bit = 0x2000, Gi_Loading_On_Gate_Bit = 0x4000,
  Gi_Reload_Source_Switching_Bit = 0x8000
}
 
enum  Gi_Second_Gate_Bits {
  Gi_Second_Gate_Mode_Bit = 0x1, Gi_Second_Gate_Select_Mask = 0x1f << Gi_Second_Gate_Select_Shift, Gi_Second_Gate_Polarity_Bit = 0x2000, Gi_Second_Gate_Subselect_Bit = 0x4000,
  Gi_Source_Subselect_Bit = 0x8000
}
 
enum  Gxx_Status_Bits {
  G0_Save_Bit = 0x1, G1_Save_Bit = 0x2, G0_Counting_Bit = 0x4, G1_Counting_Bit = 0x8,
  G0_Next_Load_Source_Bit = 0x10, G1_Next_Load_Source_Bit = 0x20, G0_Stale_Data_Bit = 0x40, G1_Stale_Data_Bit = 0x80,
  G0_Armed_Bit = 0x100, G1_Armed_Bit = 0x200, G0_No_Load_Between_Gates_Bit = 0x400, G1_No_Load_Between_Gates_Bit = 0x800,
  G0_TC_Error_Bit = 0x1000, G1_TC_Error_Bit = 0x2000, G0_Gate_Error_Bit = 0x4000, G1_Gate_Error_Bit = 0x8000
}
 
enum  Gxx_Joint_Status2_Bits {
  G0_Output_Bit = 0x1, G1_Output_Bit = 0x2, G0_HW_Save_Bit = 0x1000, G1_HW_Save_Bit = 0x2000,
  G0_Permanent_Stale_Bit = 0x4000, G1_Permanent_Stale_Bit = 0x8000
}
 
enum  Gi_DMA_Config_Reg_Bits { Gi_DMA_Enable_Bit = 0x1, Gi_DMA_Write_Bit = 0x2, Gi_DMA_Int_Bit = 0x4 }
 
enum  Gi_DMA_Status_Reg_Bits { Gi_DMA_Readbank_Bit = 0x2000, Gi_DRQ_Error_Bit = 0x4000, Gi_DRQ_Status_Bit = 0x8000 }
 
enum  G02_Interrupt_Acknowledge_Bits { G0_Gate_Error_Confirm_Bit = 0x20, G0_TC_Error_Confirm_Bit = 0x40 }
 
enum  G13_Interrupt_Acknowledge_Bits { G1_Gate_Error_Confirm_Bit = 0x2, G1_TC_Error_Confirm_Bit = 0x4 }
 
enum  Gxx_Interrupt_Acknowledge_Bits { Gi_TC_Interrupt_Ack_Bit = 0x4000, Gi_Gate_Interrupt_Ack_Bit = 0x8000 }
 
enum  Gi_Status_Bits { Gi_Gate_Interrupt_Bit = 0x4, Gi_TC_Bit = 0x8, Gi_Interrupt_Bit = 0x8000 }
 
enum  G02_Interrupt_Enable_Bits { G0_TC_Interrupt_Enable_Bit = 0x40, G0_Gate_Interrupt_Enable_Bit = 0x100 }
 
enum  G13_Interrupt_Enable_Bits { G1_TC_Interrupt_Enable_Bit = 0x200, G1_Gate_Interrupt_Enable_Bit = 0x400 }
 

Functions

int ni_tio_arm (struct ni_gpct *counter, int arm, unsigned start_trigger)
 
int ni_tio_set_gate_src (struct ni_gpct *counter, unsigned gate_index, unsigned int gate_source)
 

Macro Definition Documentation

#define Gi_Gate_Select_Shift   7

Definition at line 495 of file ni_tio_internal.h.

#define Gi_HW_Arm_Select_Shift   8

Definition at line 460 of file ni_tio_internal.h.

#define Gi_Index_Phase_Bitshift   5

Definition at line 459 of file ni_tio_internal.h.

#define Gi_Second_Gate_Select_Shift   7

Definition at line 540 of file ni_tio_internal.h.

#define Gi_Source_Select_Shift   2

Definition at line 494 of file ni_tio_internal.h.

#define Gi_Up_Down_Shift   5

Definition at line 437 of file ni_tio_internal.h.

Enumeration Type Documentation

Enumerator:
G0_Gate_Error_Confirm_Bit 
G0_TC_Error_Confirm_Bit 

Definition at line 651 of file ni_tio_internal.h.

Enumerator:
G0_TC_Interrupt_Enable_Bit 
G0_Gate_Interrupt_Enable_Bit 

Definition at line 685 of file ni_tio_internal.h.

Enumerator:
G1_Gate_Error_Confirm_Bit 
G1_TC_Error_Confirm_Bit 

Definition at line 655 of file ni_tio_internal.h.

Enumerator:
G1_TC_Interrupt_Enable_Bit 
G1_Gate_Interrupt_Enable_Bit 

Definition at line 689 of file ni_tio_internal.h.

Enumerator:
Gi_Auto_Increment_Mask 

Definition at line 433 of file ni_tio_internal.h.

Enumerator:
Gi_Arm_Bit 
Gi_Save_Trace_Bit 
Gi_Load_Bit 
Gi_Disarm_Bit 
Gi_Up_Down_Mask 
Gi_Always_Down_Bits 
Gi_Always_Up_Bits 
Gi_Up_Down_Hardware_IO_Bits 
Gi_Up_Down_Hardware_Gate_Bits 
Gi_Write_Switch_Bit 
Gi_Synchronize_Gate_Bit 
Gi_Little_Big_Endian_Bit 
Gi_Bank_Switch_Start_Bit 
Gi_Bank_Switch_Mode_Bit 
Gi_Bank_Switch_Enable_Bit 
Gi_Arm_Copy_Bit 
Gi_Save_Trace_Copy_Bit 
Gi_Disarm_Copy_Bit 

Definition at line 438 of file ni_tio_internal.h.

Enumerator:
Gi_Counting_Mode_Mask 
Gi_Counting_Mode_Normal_Bits 
Gi_Counting_Mode_QuadratureX1_Bits 
Gi_Counting_Mode_QuadratureX2_Bits 
Gi_Counting_Mode_QuadratureX4_Bits 
Gi_Counting_Mode_Two_Pulse_Bits 
Gi_Counting_Mode_Sync_Source_Bits 
Gi_Index_Mode_Bit 
Gi_Index_Phase_Mask 
Gi_Index_Phase_LowA_LowB 
Gi_Index_Phase_LowA_HighB 
Gi_Index_Phase_HighA_LowB 
Gi_Index_Phase_HighA_HighB 
Gi_HW_Arm_Enable_Bit 
Gi_660x_HW_Arm_Select_Mask 
Gi_660x_Prescale_X8_Bit 
Gi_M_Series_Prescale_X8_Bit 
Gi_M_Series_HW_Arm_Select_Mask 
Gi_660x_Alternate_Sync_Bit 
Gi_M_Series_Alternate_Sync_Bit 
Gi_660x_Prescale_X2_Bit 
Gi_M_Series_Prescale_X2_Bit 

Definition at line 461 of file ni_tio_internal.h.

Enumerator:
Gi_DMA_Enable_Bit 
Gi_DMA_Write_Bit 
Gi_DMA_Int_Bit 

Definition at line 639 of file ni_tio_internal.h.

Enumerator:
Gi_DMA_Readbank_Bit 
Gi_DRQ_Error_Bit 
Gi_DRQ_Status_Bit 

Definition at line 645 of file ni_tio_internal.h.

Enumerator:
Gi_Read_Acknowledges_Irq 
Gi_Write_Acknowledges_Irq 
Gi_Source_Select_Mask 
Gi_Gate_Select_Mask 
Gi_Gate_Select_Load_Source_Bit 
Gi_Or_Gate_Bit 
Gi_Output_Polarity_Bit 
Gi_Source_Polarity_Bit 

Definition at line 496 of file ni_tio_internal.h.

Enumerator:
Gi_Gating_Mode_Mask 
Gi_Gating_Disabled_Bits 
Gi_Level_Gating_Bits 
Gi_Rising_Edge_Gating_Bits 
Gi_Falling_Edge_Gating_Bits 
Gi_Gate_On_Both_Edges_Bit 
Gi_Trigger_Mode_for_Edge_Gate_Mask 
Gi_Edge_Gate_Starts_Stops_Bits 
Gi_Edge_Gate_Stops_Starts_Bits 
Gi_Edge_Gate_Starts_Bits 
Gi_Edge_Gate_No_Starts_or_Stops_Bits 
Gi_Stop_Mode_Mask 
Gi_Stop_on_Gate_Bits 
Gi_Stop_on_Gate_or_TC_Bits 
Gi_Stop_on_Gate_or_Second_TC_Bits 
Gi_Load_Source_Select_Bit 
Gi_Output_Mode_Mask 
Gi_Output_TC_Pulse_Bits 
Gi_Output_TC_Toggle_Bits 
Gi_Output_TC_or_Gate_Toggle_Bits 
Gi_Counting_Once_Mask 
Gi_No_Hardware_Disarm_Bits 
Gi_Disarm_at_TC_Bits 
Gi_Disarm_at_Gate_Bits 
Gi_Disarm_at_TC_or_Gate_Bits 
Gi_Loading_On_TC_Bit 
Gi_Gate_Polarity_Bit 
Gi_Loading_On_Gate_Bit 
Gi_Reload_Source_Switching_Bit 

Definition at line 507 of file ni_tio_internal.h.

Enumerator:
Gi_Second_Gate_Mode_Bit 
Gi_Second_Gate_Select_Mask 
Gi_Second_Gate_Polarity_Bit 
Gi_Second_Gate_Subselect_Bit 
Gi_Source_Subselect_Bit 

Definition at line 543 of file ni_tio_internal.h.

Enumerator:
Gi_Gate_Interrupt_Bit 
Gi_TC_Bit 
Gi_Interrupt_Bit 

Definition at line 679 of file ni_tio_internal.h.

Enumerator:
Gi_TC_Interrupt_Ack_Bit 
Gi_Gate_Interrupt_Ack_Bit 

Definition at line 674 of file ni_tio_internal.h.

Enumerator:
G0_Output_Bit 
G1_Output_Bit 
G0_HW_Save_Bit 
G1_HW_Save_Bit 
G0_Permanent_Stale_Bit 
G1_Permanent_Stale_Bit 

Definition at line 623 of file ni_tio_internal.h.

Enumerator:
G0_Save_Bit 
G1_Save_Bit 
G0_Counting_Bit 
G1_Counting_Bit 
G0_Next_Load_Source_Bit 
G1_Next_Load_Source_Bit 
G0_Stale_Data_Bit 
G1_Stale_Data_Bit 
G0_Armed_Bit 
G1_Armed_Bit 
G0_No_Load_Between_Gates_Bit 
G1_No_Load_Between_Gates_Bit 
G0_TC_Error_Bit 
G1_TC_Error_Bit 
G0_Gate_Error_Bit 
G1_Gate_Error_Bit 

Definition at line 556 of file ni_tio_internal.h.

Function Documentation

int ni_tio_arm ( struct ni_gpct counter,
int  arm,
unsigned  start_trigger 
)

Definition at line 544 of file ni_tio.c.

int ni_tio_set_gate_src ( struct ni_gpct counter,
unsigned  gate_index,
unsigned int  gate_source 
)

Definition at line 1222 of file ni_tio.c.