Defines

mTouchCVD_macroLibrary_PIC16F.h File Reference

Go to the source code of this file.

Defines

#define MASKBANK(var, bank)   ((var)^((bank)*80h))
 Masks the bank out of the variable address for ASM code usage.
#define NOBANK(var)   (var & 0x7F)
#define SAVE_STATE()
#define RESTORE_STATE()
#define CVD_ASM_JUMP_LABEL_1()   case 1: asm("ljmp sensor_1");
#define CVD_ASM_JUMP_LABEL_2()   case 2: asm("ljmp sensor_2");
#define CVD_ASM_JUMP_LABEL_3()   case 3: asm("ljmp sensor_3");
#define CVD_ASM_JUMP_LABEL_4()   case 4: asm("ljmp sensor_4");
#define CVD_ASM_JUMP_LABEL_5()   case 5: asm("ljmp sensor_5");
#define CVD_ASM_JUMP_LABEL_6()   case 6: asm("ljmp sensor_6");
#define CVD_ASM_JUMP_LABEL_7()   case 7: asm("ljmp sensor_7");
#define CVD_ASM_JUMP_LABEL_8()   case 8: asm("ljmp sensor_8");
#define CVD_ASM_JUMP_LABEL_9()   case 9: asm("ljmp sensor_9");
#define CVD_ASM_JUMP_LABEL_10()   case 10: asm("ljmp sensor_10");
#define CVD_ASM_JUMP_LABEL_11()   case 11: asm("ljmp sensor_11");
#define CVD_ASM_JUMP_LABEL_12()   case 12: asm("ljmp sensor_12");
#define CVD_ASM_JUMP_LABEL_13()   case 13: asm("ljmp sensor_13");
#define CVD_ASM_JUMP_LABEL_14()   case 14: asm("ljmp sensor_14");
#define CVD_ASM_JUMP_LABEL_15()   case 15: asm("ljmp sensor_15");
#define CVD_ASM_JUMP_LABEL_16()   case 16: asm("ljmp sensor_16");
#define CVD_ASM_JUMP_LABEL_17()   case 17: asm("ljmp sensor_17");
#define CVD_ASM_JUMP_LABEL_18()   case 18: asm("ljmp sensor_18");
#define CVD_ASM_JUMP_LABEL_19()   case 19: asm("ljmp sensor_19");
#define CVD_ASM_JUMP_LABEL_20()   case 20: asm("ljmp sensor_20");
#define CVD_ASM_JUMP_LABEL_21()   case 21: asm("ljmp sensor_21");
#define CVD_ASM_JUMP_LABEL_22()   case 22: asm("ljmp sensor_22");
#define CVD_ASM_JUMP_LABEL_23()   case 23: asm("ljmp sensor_23");
#define CVD_ASM_JUMP_LABEL_24()   case 24: asm("ljmp sensor_24");
#define CVD_ASM_JUMP_LABEL_25()   case 25: asm("ljmp sensor_25");
#define CVD_ASM_JUMP_LABEL_26()   case 26: asm("ljmp sensor_26");
#define CVD_ASM_JUMP_LABEL_27()   case 27: asm("ljmp sensor_27");
#define CVD_ASM_JUMP_LABEL_28()   case 28: asm("ljmp sensor_28");
#define CVD_ASM_JUMP_LABEL_29()   case 29: asm("ljmp sensor_29");
#define CVD_STORE_LABEL_0()   STORE_LAST_SENSOR(0);
#define CVD_STORE_LABEL_1()   STORE_SENSOR(1);
#define CVD_STORE_LABEL_2()   STORE_SENSOR(2);
#define CVD_STORE_LABEL_3()   STORE_SENSOR(3);
#define CVD_STORE_LABEL_4()   STORE_SENSOR(4);
#define CVD_STORE_LABEL_5()   STORE_SENSOR(5);
#define CVD_STORE_LABEL_6()   STORE_SENSOR(6);
#define CVD_STORE_LABEL_7()   STORE_SENSOR(7);
#define CVD_STORE_LABEL_8()   STORE_SENSOR(8);
#define CVD_STORE_LABEL_9()   STORE_SENSOR(9);
#define CVD_STORE_LABEL_10()   STORE_SENSOR(10);
#define CVD_STORE_LABEL_11()   STORE_SENSOR(11);
#define CVD_STORE_LABEL_12()   STORE_SENSOR(12);
#define CVD_STORE_LABEL_13()   STORE_SENSOR(13);
#define CVD_STORE_LABEL_14()   STORE_SENSOR(14);
#define CVD_STORE_LABEL_15()   STORE_SENSOR(15);
#define CVD_STORE_LABEL_16()   STORE_SENSOR(16);
#define CVD_STORE_LABEL_17()   STORE_SENSOR(17);
#define CVD_STORE_LABEL_18()   STORE_SENSOR(18);
#define CVD_STORE_LABEL_19()   STORE_SENSOR(19);
#define CVD_STORE_LABEL_20()   STORE_SENSOR(20);
#define CVD_STORE_LABEL_21()   STORE_SENSOR(21);
#define CVD_STORE_LABEL_22()   STORE_SENSOR(22);
#define CVD_STORE_LABEL_23()   STORE_SENSOR(23);
#define CVD_STORE_LABEL_24()   STORE_SENSOR(24);
#define CVD_STORE_LABEL_25()   STORE_SENSOR(25);
#define CVD_STORE_LABEL_26()   STORE_SENSOR(26);
#define CVD_STORE_LABEL_27()   STORE_SENSOR(27);
#define CVD_STORE_LABEL_28()   STORE_SENSOR(28);
#define CVD_STORE_LABEL_29()   STORE_SENSOR(29);
#define CVD_ASM_JUMP_LABEL_29()
#define CVD_STORE_LABEL_29()
#define CVD_ASM_JUMP_LABEL_28()
#define CVD_STORE_LABEL_28()
#define CVD_ASM_JUMP_LABEL_27()
#define CVD_STORE_LABEL_27()
#define CVD_ASM_JUMP_LABEL_26()
#define CVD_STORE_LABEL_26()
#define CVD_ASM_JUMP_LABEL_25()
#define CVD_STORE_LABEL_25()
#define CVD_ASM_JUMP_LABEL_24()
#define CVD_STORE_LABEL_24()
#define CVD_ASM_JUMP_LABEL_23()
#define CVD_STORE_LABEL_23()
#define CVD_ASM_JUMP_LABEL_22()
#define CVD_STORE_LABEL_22()
#define CVD_ASM_JUMP_LABEL_21()
#define CVD_STORE_LABEL_21()
#define CVD_ASM_JUMP_LABEL_20()
#define CVD_STORE_LABEL_20()
#define CVD_ASM_JUMP_LABEL_19()
#define CVD_STORE_LABEL_19()
#define CVD_ASM_JUMP_LABEL_18()
#define CVD_STORE_LABEL_18()
#define CVD_ASM_JUMP_LABEL_17()
#define CVD_STORE_LABEL_17()
#define CVD_ASM_JUMP_LABEL_16()
#define CVD_STORE_LABEL_16()
#define CVD_ASM_JUMP_LABEL_15()
#define CVD_STORE_LABEL_15()
#define CVD_ASM_JUMP_LABEL_14()
#define CVD_STORE_LABEL_14()
#define CVD_ASM_JUMP_LABEL_13()
#define CVD_STORE_LABEL_13()
#define CVD_ASM_JUMP_LABEL_12()
#define CVD_STORE_LABEL_12()
#define CVD_ASM_JUMP_LABEL_11()
#define CVD_STORE_LABEL_11()
#define CVD_ASM_JUMP_LABEL_10()
#define CVD_STORE_LABEL_10()
#define CVD_ASM_JUMP_LABEL_9()
#define CVD_STORE_LABEL_9()
#define CVD_ASM_JUMP_LABEL_8()
#define CVD_STORE_LABEL_8()
#define CVD_ASM_JUMP_LABEL_7()
#define CVD_STORE_LABEL_7()
#define CVD_ASM_JUMP_LABEL_6()
#define CVD_STORE_LABEL_6()
#define CVD_ASM_JUMP_LABEL_5()
#define CVD_STORE_LABEL_5()
#define CVD_ASM_JUMP_LABEL_4()
#define CVD_STORE_LABEL_4()
#define CVD_ASM_JUMP_LABEL_3()
#define CVD_STORE_LABEL_3()
#define CVD_ASM_JUMP_LABEL_2()
#define CVD_STORE_LABEL_2()
#define CVD_ASM_JUMP_LABEL_1()
#define CVD_STORE_LABEL_1()
#define GENERATE_JUMP_TABLE()
 Generates a jump table in ASM used by the acquisition ISR. Do not use directly.
#define GENERATE_STORAGE_FUNCTION()
 Generates the storage macro calls for the acquisition ISR. Do not use directly.
Housekeeping Macros

These macros perform basic ISR and timer module functions such as checking that the interrupt flag is set and reloading the TMR0 counter.

#define CHECK_AND_CLEAR_TMR0IF()
 Checks the TMR0IF and determines whether the mTouch ISR is executed.
#define JITTER_START_TIME()
 Calculates a random value and uses it to seed TMR0.
#define WAIT_FOR_GODONE_BIT()   while (GO_nDONE);
 Implements a while loop waiting on the GO/DONE bit to be cleared.
#define STORE_LAST_RESULT()
 Stores the ADC result into the last_result variable.
Timing Critical CVD Scanning Routine Macros

These macros implement the CVD scanning routine and basic acquistion-level filtering techniques. Editting these macros could reduce the noise immunity of the system.

#define READ_SENSOR(indexSensor, indexRef)   READ_SENSOR_EXPANDED(__paste(CVD_SELECT_SENSOR,indexSensor),__paste(CVD_SELECT_SENSOR,indexRef),__paste(CVD_PORT_SENSOR,indexSensor),__paste(CVD_PIN_SENSOR,indexSensor),__paste(CVD_PORT_SENSOR,indexRef),__paste(CVD_PIN_SENSOR,indexRef))
 Perform a differential CVD scan on the sensor.
#define READ_SENSOR_EXPANDED(current_channel, ref_channel, port, pin, ref_port, ref_pin)
 Expanded utility macro called by READ_SENSOR(). Do not use directly.
#define CVD_DECIMATE()
 Generates ASM code to compare the previous sensor's scan result with its slew rate limited latch register, sensor_data.
#define CVD_SENSOR_SMALLER()
 Generates ASM code to decrement the slew rate limited sensor_data latch register.
#define CVD_DECIMATE_END()
 Generates ASM code to decrement the slew rate limited sensor_data latch register.
Polishing/Finishing Macros

These macros perform scaling and final operations before setting the mTouchCVD_dataReady flag and allowing the main loop application to process the new data.

#define STORE_SENSOR_SCALE(index, shift)
 Do not use directly. Expanded utility macro called by STORE_SENSOR(index).
#define STORE_LAST_SENSOR_SCALE(index, shift)
 Do not use directly. Expanded utility macro called by STORE_SENSOR(index).
#define STORE_SINGLE_SENSOR_SCALE(index, shift)
 Do not use directly. Expanded utility macro called by STORE_SENSOR(index) if there is only one sensor in the mTouch application.
#define STORE_SENSOR(index)   STORE_SENSOR_SCALE(index, 4)
 Scales the accumulated result of the CVD acquisition and stores it for main-application access.
#define EXIT_SENSOR(index)
 Increments the given index variable and exits the ISR.
#define EXIT_LAST_SENSOR(index)   EXIT_LAST_SENSOR_MAIN()
 Performs several important functions after all sensors have been scanned.
#define EXIT_LAST_SENSOR_MAIN()
 Do not use directly. Utility macro used by EXIT_LAST_SENSOR() to decrement the oversampling counter.
#define EXIT_LAST_SENSOR_DECINDEX(index)
 Do not use directly. Utility macro used by EXIT_LAST_SENSOR() to reset the index variable.
#define SET_DATA_READY_FLAG()
 Sets the dataReady flag to signal the main application of a new reading.

Define Documentation

#define CVD_ASM_JUMP_LABEL_1 (  )    case 1: asm("ljmp sensor_1");

Definition at line 921 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_1 (  )

Definition at line 921 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_10 (  )    case 10: asm("ljmp sensor_10");

Definition at line 867 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_10 (  )

Definition at line 867 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_11 (  )    case 11: asm("ljmp sensor_11");

Definition at line 861 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_11 (  )

Definition at line 861 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_12 (  )    case 12: asm("ljmp sensor_12");

Definition at line 855 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_12 (  )

Definition at line 855 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_13 (  )    case 13: asm("ljmp sensor_13");

Definition at line 849 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_13 (  )

Definition at line 849 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_14 (  )    case 14: asm("ljmp sensor_14");

Definition at line 843 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_14 (  )

Definition at line 843 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_15 (  )    case 15: asm("ljmp sensor_15");

Definition at line 837 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_15 (  )

Definition at line 837 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_16 (  )    case 16: asm("ljmp sensor_16");

Definition at line 831 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_16 (  )

Definition at line 831 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_17 (  )    case 17: asm("ljmp sensor_17");

Definition at line 825 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_17 (  )

Definition at line 825 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_18 (  )    case 18: asm("ljmp sensor_18");

Definition at line 819 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_18 (  )

Definition at line 819 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_19 (  )    case 19: asm("ljmp sensor_19");

Definition at line 813 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_19 (  )

Definition at line 813 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_2 (  )

Definition at line 915 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_2 (  )    case 2: asm("ljmp sensor_2");

Definition at line 915 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_20 (  )    case 20: asm("ljmp sensor_20");

Definition at line 807 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_20 (  )

Definition at line 807 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_21 (  )    case 21: asm("ljmp sensor_21");

Definition at line 801 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_21 (  )

Definition at line 801 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_22 (  )    case 22: asm("ljmp sensor_22");

Definition at line 795 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_22 (  )

Definition at line 795 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_23 (  )    case 23: asm("ljmp sensor_23");

Definition at line 789 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_23 (  )

Definition at line 789 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_24 (  )

Definition at line 783 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_24 (  )    case 24: asm("ljmp sensor_24");

Definition at line 783 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_25 (  )

Definition at line 777 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_25 (  )    case 25: asm("ljmp sensor_25");

Definition at line 777 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_26 (  )

Definition at line 771 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_26 (  )    case 26: asm("ljmp sensor_26");

Definition at line 771 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_27 (  )

Definition at line 765 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_27 (  )    case 27: asm("ljmp sensor_27");

Definition at line 765 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_28 (  )

Definition at line 759 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_28 (  )    case 28: asm("ljmp sensor_28");

Definition at line 759 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_29 (  )

Definition at line 753 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_29 (  )    case 29: asm("ljmp sensor_29");

Definition at line 753 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_3 (  )

Definition at line 909 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_3 (  )    case 3: asm("ljmp sensor_3");

Definition at line 909 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_4 (  )

Definition at line 903 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_4 (  )    case 4: asm("ljmp sensor_4");

Definition at line 903 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_5 (  )

Definition at line 897 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_5 (  )    case 5: asm("ljmp sensor_5");

Definition at line 897 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_6 (  )

Definition at line 891 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_6 (  )    case 6: asm("ljmp sensor_6");

Definition at line 891 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_7 (  )    case 7: asm("ljmp sensor_7");

Definition at line 885 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_7 (  )

Definition at line 885 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_8 (  )    case 8: asm("ljmp sensor_8");

Definition at line 879 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_8 (  )

Definition at line 879 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_9 (  )

Definition at line 873 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_ASM_JUMP_LABEL_9 (  )    case 9: asm("ljmp sensor_9");

Definition at line 873 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_0 (  )    STORE_LAST_SENSOR(0);

Definition at line 716 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_1 (  )

Definition at line 923 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_1 (  )    STORE_SENSOR(1);

Definition at line 923 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_10 (  )    STORE_SENSOR(10);

Definition at line 869 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_10 (  )

Definition at line 869 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_11 (  )

Definition at line 863 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_11 (  )    STORE_SENSOR(11);

Definition at line 863 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_12 (  )    STORE_SENSOR(12);

Definition at line 857 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_12 (  )

Definition at line 857 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_13 (  )    STORE_SENSOR(13);

Definition at line 851 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_13 (  )

Definition at line 851 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_14 (  )    STORE_SENSOR(14);

Definition at line 845 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_14 (  )

Definition at line 845 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_15 (  )

Definition at line 839 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_15 (  )    STORE_SENSOR(15);

Definition at line 839 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_16 (  )    STORE_SENSOR(16);

Definition at line 833 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_16 (  )

Definition at line 833 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_17 (  )    STORE_SENSOR(17);

Definition at line 827 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_17 (  )

Definition at line 827 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_18 (  )    STORE_SENSOR(18);

Definition at line 821 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_18 (  )

Definition at line 821 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_19 (  )    STORE_SENSOR(19);

Definition at line 815 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_19 (  )

Definition at line 815 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_2 (  )

Definition at line 917 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_2 (  )    STORE_SENSOR(2);

Definition at line 917 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_20 (  )    STORE_SENSOR(20);

Definition at line 809 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_20 (  )

Definition at line 809 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_21 (  )    STORE_SENSOR(21);

Definition at line 803 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_21 (  )

Definition at line 803 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_22 (  )    STORE_SENSOR(22);

Definition at line 797 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_22 (  )

Definition at line 797 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_23 (  )

Definition at line 791 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_23 (  )    STORE_SENSOR(23);

Definition at line 791 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_24 (  )    STORE_SENSOR(24);

Definition at line 785 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_24 (  )

Definition at line 785 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_25 (  )    STORE_SENSOR(25);

Definition at line 779 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_25 (  )

Definition at line 779 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_26 (  )    STORE_SENSOR(26);

Definition at line 773 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_26 (  )

Definition at line 773 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_27 (  )

Definition at line 767 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_27 (  )    STORE_SENSOR(27);

Definition at line 767 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_28 (  )    STORE_SENSOR(28);

Definition at line 761 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_28 (  )

Definition at line 761 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_29 (  )    STORE_SENSOR(29);

Definition at line 755 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_29 (  )

Definition at line 755 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_3 (  )

Definition at line 911 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_3 (  )    STORE_SENSOR(3);

Definition at line 911 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_4 (  )    STORE_SENSOR(4);

Definition at line 905 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_4 (  )

Definition at line 905 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_5 (  )

Definition at line 899 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_5 (  )    STORE_SENSOR(5);

Definition at line 899 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_6 (  )    STORE_SENSOR(6);

Definition at line 893 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_6 (  )

Definition at line 893 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_7 (  )

Definition at line 887 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_7 (  )    STORE_SENSOR(7);

Definition at line 887 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_8 (  )

Definition at line 881 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_8 (  )    STORE_SENSOR(8);

Definition at line 881 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_9 (  )    STORE_SENSOR(9);

Definition at line 875 of file mTouchCVD_macroLibrary_PIC16F.h.

#define CVD_STORE_LABEL_9 (  )

Definition at line 875 of file mTouchCVD_macroLibrary_PIC16F.h.

#define EXIT_LAST_SENSOR_DECINDEX (   index )
Value:
do {                                                                                                        \
    index = 0;                                                                                              \
} while(0)

Do not use directly. Utility macro used by EXIT_LAST_SENSOR() to reset the index variable.

Parameters:
[in]indexthe index variable to reset to 0

Definition at line 641 of file mTouchCVD_macroLibrary_PIC16F.h.

#define EXIT_LAST_SENSOR_MAIN (  )
Value:
do {                                                                                                                            \
    if (--sample_counter != 0)                            /* Decrement the sample counter and check if it's equal to 0      */  \
        asm("ljmp END_ISR");                              /* If not equal to 0, exit the ISR                                */  \
    sample_counter = CVD_SAMPLES_PER_SCAN;                /* If equal to 0, reset the sample counter continue with storage  */  \
} while(0)

Do not use directly. Utility macro used by EXIT_LAST_SENSOR() to decrement the oversampling counter.

Parameters:
[in]None

Definition at line 634 of file mTouchCVD_macroLibrary_PIC16F.h.

#define MASKBANK (   var,
  bank 
)    ((var)^((bank)*80h))

Masks the bank out of the variable address for ASM code usage.

Parameters:
varthe variable address to mask
bankthe bank location of the variable

Definition at line 73 of file mTouchCVD_macroLibrary_PIC16F.h.

#define NOBANK (   var )    (var & 0x7F)

Definition at line 74 of file mTouchCVD_macroLibrary_PIC16F.h.

#define RESTORE_STATE (  )
Value:
do {                                \
    asm("movf   _int_fsr,W");       \
    asm("movwf  _FSR");             \
    asm("movf   _int_pclath,W");    \
    asm("movwf  _PCLATH");          \
    asm("movf   _int_status,W");    \
    asm("movwf  _STATUS");          \
    asm("swapf  _int_w, W");        \
} while (0)

Definition at line 101 of file mTouchCVD_macroLibrary_PIC16F.h.

#define SAVE_STATE (  )
Value:
do {                                \
    asm("movwf  _int_w");           \
    asm("swapf  _int_w, F");        \
    asm("movf   _STATUS, W");       \
    asm("clrf   _STATUS");          \
    asm("movwf  _int_status");      \
    asm("movf   _PCLATH, W");       \
    asm("clrf   _PCLATH");          \
    asm("movwf  _int_pclath");      \
    asm("movf   _FSR, W");          \
    asm("movwf  _int_fsr");         \
} while (0)

Definition at line 82 of file mTouchCVD_macroLibrary_PIC16F.h.

#define STORE_LAST_SENSOR_SCALE (   index,
  shift 
)
Value:
do {                                                                                                \
        CVDSensorData[CVD_NUMBER_SENSORS-1] = (unsigned int)(CVD_Acq_Filtered_Data[index] >> shift);    \
        CVD_Acq_Filtered_Data[index] = 0;                                                               \
    } while(0)

Do not use directly. Expanded utility macro called by STORE_SENSOR(index).

Parameters:
[in]indexthe index of the sensor to be scaled and stored
[in]shiftthe number of times to shift the accumulator value to the right before storing its value in the CVDSensorData array

Definition at line 538 of file mTouchCVD_macroLibrary_PIC16F.h.

#define STORE_SENSOR_SCALE (   index,
  shift 
)
Value:
do {                                                                                \
        CVDSensorData[index-1] = (unsigned int)(CVD_Acq_Filtered_Data[index] >> shift); \
        CVD_Acq_Filtered_Data[index] = 0;                                               \
    } while(0)

Do not use directly. Expanded utility macro called by STORE_SENSOR(index).

Parameters:
[in]indexthe index of the sensor to be scaled and stored
[in]shiftthe number of times to shift the accumulator value to the right before storing its value in the CVDSensorData array

Definition at line 526 of file mTouchCVD_macroLibrary_PIC16F.h.

#define STORE_SINGLE_SENSOR_SCALE (   index,
  shift 
)
Value:
do {                                                                        \
        CVDSensorData[0] = (unsigned int)(CVD_Acq_Filtered_Data[0] >> shift);   \
        CVD_Acq_Filtered_Data[0] = 0;                                           \
    } while(0)

Do not use directly. Expanded utility macro called by STORE_SENSOR(index) if there is only one sensor in the mTouch application.

Parameters:
[in]indexthe index of the sensor to be scaled and stored
[in]shiftthe number of times to shift the accumulator value to the right before storing its value in the CVDSensorData array

Definition at line 550 of file mTouchCVD_macroLibrary_PIC16F.h.