<!clock: {"ALL" : "TMR3" };
  pin:   {"TIMER3OutputPinRadio":{"TIMER_TOUT_PIN_FROM_TX": "TM3",
								  "TIMER_TOUT_PIN_FROM_TX_EXT": "TM3_EXT"},
		  "TPWM0OutputPinRadio":{"TPWM_TOUT_PIN_FROM_TX": "TM3",
								 "TPWM_TOUT_PIN_FROM_TX_EXT": "TM3_EXT"},
		  "TIMER3EventCountCheckbox":{"1": "TM3"},
		  "TIMER3CaptureSourceSelect":{"TIMER3_CAP_FROM_EXTERNAL": "TM3_EXT"},
		  "ALL":[""]};
!>
/*--------------------------------------------------------------------------*/
/* TIMER3 Configuration                                                     */
/*--------------------------------------------------------------------------*/

#define TIMER3_MODE						<!id:TIMER3ModeRadio;
										type:radio;
										label:Select TIMER3 operation mode;
										data:TIMER_ONESHOT_MODE;
										default:TIMER_ONESHOT_MODE;
										enum:[TIMER_ONESHOT_MODE, TIMER_PERIODIC_MODE, TIMER_TOGGLE_MODE, TIMER_CONTINUOUS_MODE];
										optionLabels:[One-shot, Periodic, Toggle, Continuous counting];
										dependencies:none;
										dependenciesOption:none;
										groupId:Timer_Common;
										groupName:Timer common configuration;!>

#define NUCODEGEN_TIMER3_TOUT_PIN		<!id:TIMER3OutputPinRadio;
										type:radio;
										label:Select TIMER3 output pin;
										data:TIMER_TOUT_PIN_FROM_TX;
										default:TIMER_TOUT_PIN_FROM_TX;
										enum:[TIMER_TOUT_PIN_FROM_TX, TIMER_TOUT_PIN_FROM_TX_EXT];
										optionLabels:[Output pin from TX, Output pin from TX_EXT];
										dependencies:TIMER3ModeRadio;
										dependenciesOption:TIMER_TOGGLE_MODE;
										groupId:Timer_Common;!>

#define TIMER3_FREQ						<!id:TIMER3FreqInteger;
										type:integer;
										label:Set TIMER3 frequency;
										data:1000000;
										default:1000000;
										helper:Enter your TIMER3 frequency 1~ClkSrc/2(Hz);
										minimum:1;
										maximum:24000000;
										dependencies:none;
										dependenciesOption:none;
										groupId:Timer_Common;!>

#define NUCODEGEN_TIMER3_VALUE			<!id:TIMER3SetValueCheckbox;
										type:checkbox;
										label:Enable TIMER3 set prescale & compared value;
										data:0;
										default:0;
										helper:Will change TIMER3 frequency;
										enum:[1];
										optionLabels:[<br>];
										dependencies:none;
										dependenciesOption:none;
										groupId:Timer_Common;!>

#if NUCODEGEN_TIMER3_VALUE
	#define TIMER3_PRESCALE_VALUE		<!id:TIMER3PrescaleInteger;
										type:integer;
										label:TIMER3 prescale value;
										data:90;
										default:90;
										helper:Enter your TIMER3 prescale value(dec);
										minimum:0;
										maximum:255;
										dependencies:TIMER3SetValueCheckbox;
										dependenciesOption:1;
										groupId:Timer_Common;!>
	#define TIMER3_CMP_VALUE			<!id:TIMER3CMPHexText;
										type:hextext;
										label:TIMER3 compared value;
										data:0x5A5A5A;
										default:0x5A5A5A;
										helper:Enter your TIMER3 compared value(hex);
										minimum:0x2;
										maximum:0xFFFFFF;
										dependencies:TIMER3SetValueCheckbox;
										dependenciesOption:1;
										groupId:Timer_Common;!>
#endif //NUCODEGEN_TIMER3_VALUE

#define NUCODEGEN_TIMER3_WAKEUP			<!id:TIMER3WakeUpCheckbox;
										type:checkbox;
										label:Enable TIMER3 wake-up;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:none;
										dependenciesOption:none
										groupId:Timer_Common;!>

#define NUCODEGEN_TIMER3_INT			<!id:TIMER3IntCheckbox;
										type:checkbox;
										label:Enable TIMER3 time-out interrupt;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:none;
										dependenciesOption:none
										groupId:Timer_Common;!>

#define NUCODEGEN_TIMER3_EVENT_CNT		<!id:TIMER3EventCountCheckbox;
										type:checkbox;
										label:Enable TIMER3 event counting;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:TIMER3ModeRadio;
										dependenciesOption:TIMER_ONESHOT_MODE|TIMER_PERIODIC_MODE|TIMER_CONTINUOUS_MODE;
										groupId:Event_Count;
										groupName:Event count configuration;
                                        filterExp:PB_dot5==1 or PC_dot7==1;!>

#define NUCODEGEN_TIMER3_COUNTER_PHASE	<!id:TIMER3PhaseRadio;
										type:radio;
										label:Select TIMER3 external count phase;
										data:TIMER_COUNTER_FALLING_EDGE;
										default:TIMER_COUNTER_FALLING_EDGE;
										enum:[TIMER_COUNTER_FALLING_EDGE, TIMER_COUNTER_RISING_EDGE];
										optionLabels:[Event falling edge, Event rising edge];
										dependencies:TIMER3EventCountCheckbox;
										dependenciesOption:1;
										groupId:Event_Count;
                                        filterExp:PB_dot5==1 or PC_dot7==1;!>

#define NUCODEGEN_TIMER3_EVENT_CNTDB	<!id:TIMER3EventCountDebounceCheckbox;
										type:checkbox;
										label:Enable TIMER3 event counting de-bounce;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:TIMER3EventCountCheckbox;
										dependenciesOption:1;
										groupId:Event_Count;
                                        filterExp:PB_dot5==1 or PC_dot7==1;!>

#define NUCODEGEN_TIMER3_CAP			<!id:TIMER3CaptureCheckbox;
										type:checkbox;
										label:Enable TIMER3 capture;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:TIMER3ModeRadio;
										dependenciesOption:TIMER_ONESHOT_MODE|TIMER_PERIODIC_MODE|TIMER_CONTINUOUS_MODE;
										groupId:Capture;
										groupName:Capture configuration;!>

#if NUCODEGEN_TIMER3_CAP
#define TIMER3_CAP_FROM_EXTERNAL 1
#define TIMER3_CAP_SRC					<!id:TIMER3CaptureSourceSelect;
										type:select;
										label:Select TIMER3 capture trigger source;
										data:TIMER3_CAP_FROM_EXTERNAL;
										default:TIMER3_CAP_FROM_EXTERNAL;
										enum:[TIMER3_CAP_FROM_EXTERNAL, TIMER_INTERCAPSEL_ACMP0, TIMER_INTERCAPSEL_ACMP1, TIMER_INTERCAPSEL_LIRC];
										optionLabels:[Capture source from external, Internal source from ACMP0, Internal source from ACMP1, Internal source from LIRC];
										dependencies:TIMER3CaptureCheckbox;
										dependenciesOption:1;
										groupId:Capture;!>
#endif //NUCODEGEN_TIMER3_CAP

#define NUCODEGEN_TIMER3_CAP_EDGE		<!id:TIMER3CaptureEdgeSelect;
										type:select;
										label:Select TIMER3 capture edge detect;
										data:TIMER_CAPTURE_FALLING_EDGE;
										default:TIMER_CAPTURE_FALLING_EDGE;
										enum:[TIMER_CAPTURE_FALLING_EDGE, TIMER_CAPTURE_RISING_EDGE, TIMER_CAPTURE_FALLING_AND_RISING_EDGE];
										optionLabels:[Capture on falling edge, Capture on rising edge, Capture on falling or rising edges];
										dependencies:TIMER3CaptureCheckbox;
										dependenciesOption:1;
										groupId:Capture;!>

#define NUCODEGEN_TIMER3_CAP_MODE		<!id:TIMER3CaptureModeRadio;
										type:radio;
										label:Select TIMER3 capture mode;
										data:TIMER_CAPTURE_FREE_COUNTING_MODE;
										default:TIMER_CAPTURE_FREE_COUNTING_MODE;
										enum:[TIMER_CAPTURE_FREE_COUNTING_MODE, TIMER_CAPTURE_COUNTER_RESET_MODE];
										optionLabels:[Free counting, Counter reset];
										dependencies:TIMER3CaptureCheckbox;
										dependenciesOption:1;
										groupId:Capture;!>

#define NUCODEGEN_TIMER3_CAPDB			<!id:TIMER3CaptureDebounceCheckbox;
										type:checkbox;
										label:Enable TIMER3 capture de-bounce;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:TIMER3CaptureCheckbox;
										dependenciesOption:1;
										groupId:Capture;!>

#define NUCODEGEN_TIMER3_CAP_INT		<!id:TIMER3CaptureIntCheckbox;
										type:checkbox;
										label:Enable TIMER3 capture interrupt;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:TIMER3CaptureCheckbox;
										dependenciesOption:1;
										groupId:Capture;!>

#define NUCODEGEN_TIMER3_TRG			<!id:TIMER3TriggerCheckbox;
										type:checkbox;
										label:Enable TIMER3 trigger;
										data:0;
										default:0;
										enum:[1];
										optionLabels:[<br>];
										dependencies:none;
										dependenciesOption:none;
										groupId:Timer_Trigger;
										groupName:Timer trigger configuration;!>

#define NUCODEGEN_TIMER3_TRG_SRC		<!id:TIMER3TriggerConditionRadio;
										type:radio;
										label:TIMER3 trigger condition select;
										data:TIMER_TRGSRC_TIMEOUT_EVENT;
										default:TIMER_TRGSRC_TIMEOUT_EVENT;
										enum:[TIMER_TRGSRC_TIMEOUT_EVENT, TIMER_TRGSRC_CAPTURE_EVENT];
										optionLabels:[Time-out event, Capture event];
										dependencies:TIMER3TriggerCheckbox;
										dependenciesOption:1;
										groupId:Timer_Trigger;!>

#define NUCODEGEN_TIMER3_TRG_TARGET		<!id:TIMER3TriggerTargetCheckbox;
										type:checkbox;
										label:Select TIMER3 trigger target;
										data:0;
										default:0;
										sort:false;
										enum:[TIMER_CTL_TRGPDMA_Msk, TIMER_CTL_TRGBPWM_Msk, TIMER_CTL_TRGADC_Msk, TIMER_CTL_TRGPWM_Msk];
										optionLabels:[TIMER3 trigger PDMA, TIMER3 trigger BPWM, TIMER3 trigger ADC, TIMER3 trigger PWM];
										dependencies:TIMER3TriggerCheckbox;
										dependenciesOption:1;
										groupId:Timer_Trigger;!>

