101 P0 = P0_B0__LOW | P0_B1__HIGH | P0_B2__HIGH | P0_B3__LOW | P0_B4__HIGH
102 | P0_B5__HIGH | P0_B6__HIGH | P0_B7__LOW;
116 P0MDOUT = P0MDOUT_B0__OPEN_DRAIN | P0MDOUT_B1__OPEN_DRAIN
117 | P0MDOUT_B2__OPEN_DRAIN | P0MDOUT_B3__PUSH_PULL
118 | P0MDOUT_B4__PUSH_PULL | P0MDOUT_B5__OPEN_DRAIN
119 | P0MDOUT_B6__OPEN_DRAIN | P0MDOUT_B7__PUSH_PULL;
133 P0MDIN = P0MDIN_B0__DIGITAL | P0MDIN_B1__ANALOG | P0MDIN_B2__DIGITAL
134 | P0MDIN_B3__DIGITAL | P0MDIN_B4__DIGITAL | P0MDIN_B5__DIGITAL
135 | P0MDIN_B6__DIGITAL | P0MDIN_B7__DIGITAL;
149 P0SKIP = P0SKIP_B0__SKIPPED | P0SKIP_B1__SKIPPED | P0SKIP_B2__SKIPPED
150 | P0SKIP_B3__SKIPPED | P0SKIP_B4__NOT_SKIPPED
151 | P0SKIP_B5__NOT_SKIPPED | P0SKIP_B6__SKIPPED
152 | P0SKIP_B7__NOT_SKIPPED;
320 EIE1 = EIE1_EADC0__ENABLED | EIE1_EWADC0__DISABLED | EIE1_ECP0__DISABLED
321 | EIE1_ECP1__ENABLED | EIE1_EMAT__DISABLED | EIE1_EPCA0__DISABLED
322 | EIE1_ESMB0__DISABLED | EIE1_ET3__DISABLED;
339 IE = IE_EA__ENABLED | IE_EX0__DISABLED | IE_EX1__DISABLED
340 | IE_ESPI0__DISABLED | IE_ET0__ENABLED | IE_ET1__ENABLED
341 | IE_ET2__DISABLED | IE_ES0__ENABLED;
366 ADC0CN1 = ADC0CN1_ADCMBE__CM_BUFFER_ENABLED;
373 ADC0MX = ADC0MX_ADC0MX__ADC0P11;
383 ADC0CF = (0x06 << ADC0CF_ADSC__SHIFT) | ADC0CF_AD8BE__NORMAL
384 | ADC0CF_ADGN__GAIN_0P5 | ADC0CF_ADTM__TRACK_NORMAL;
395 ADC0AC = ADC0AC_ADSJST__LEFT_NO_SHIFT | ADC0AC_AD12BE__12_BIT_DISABLED
396 | ADC0AC_ADAE__ACC_DISABLED | ADC0AC_ADRPT__ACC_1;
405 ADC0TK = ADC0TK_AD12SM__SAMPLE_FOUR | (0x22 << ADC0TK_ADTK__SHIFT);
415 ADC0PWR = (0x04 << ADC0PWR_ADPWR__SHIFT) | ADC0PWR_ADLPM__LP_BUFFER_ENABLED
416 | ADC0PWR_ADMXLP__LP_MUX_VREF_ENABLED | ADC0PWR_ADBIAS__MODE3;
436 ADC0CN0 &= ~ADC0CN0_ADCM__FMASK;
437 ADC0CN0 |= ADC0CN0_ADBMEN__BURST_ENABLED | ADC0CN0_ADCM__TIMER2;
446 uint8_t TMR2CN0_TR2_save;
447 TMR2CN0_TR2_save = TMR2CN0 & TMR2CN0_TR2__BMASK;
449 TMR2CN0 &= ~(TMR2CN0_TR2__BMASK);
459 TMR2H = (0xE7 << TMR2H_TMR2H__SHIFT);
466 TMR2L = (0x14 << TMR2L_TMR2L__SHIFT);
473 TMR2RLH = (0xE7 << TMR2RLH_TMR2RLH__SHIFT);
480 TMR2RLL = (0x14 << TMR2RLL_TMR2RLL__SHIFT);
487 TMR2CN0 |= TMR2CN0_TR2__RUN;
492 TMR2CN0 |= TMR2CN0_TR2_save;
544 CMP1MX = CMP1MX_CMXP__LDO_OUT | CMP1MX_CMXN__CMP1N5;
546 for (delay = 0; delay < 0x20; delay++)
554 CMP1MD |= CMP1MD_CPRIE__RISE_INT_ENABLED;
563 CMP1CN0 &= ~CMP1CN0_CPHYP__FMASK;
564 CMP1CN0 |= CMP1CN0_CPEN__ENABLED | CMP1CN0_CPHYP__ENABLED_MODE1
565 | CMP1CN0_CPHYN__ENABLED_MODE3;