Do reset on pin 31 only on xplain.
This commit is contained in:
parent
7d86bd9aa2
commit
bc4570f561
2 changed files with 7 additions and 1 deletions
|
@ -369,11 +369,14 @@ void init()
|
|||
RTC_COMPINTLVL_OFF_gc;
|
||||
#endif
|
||||
|
||||
#if defined(XMEGA_XPLAIN)
|
||||
/*************************************/
|
||||
/* Enable reset button */
|
||||
initResetButton();
|
||||
|
||||
/*************************************/
|
||||
#endif
|
||||
|
||||
/* Enable interrupts. */
|
||||
PMIC.CTRL |= PMIC_LOLVLEN_bm | PMIC_MEDLVLEN_bm | PMIC_HILVLEN_bm;
|
||||
sei();
|
||||
|
@ -447,6 +450,7 @@ static uint8_t ReadCalibrationByte(uint8_t index)
|
|||
|
||||
// TODO: Do this only for xplain board.
|
||||
|
||||
#if defined(XMEGA_XPLAIN)
|
||||
static const byte resetPin = 31;
|
||||
|
||||
static void resetRupt() {
|
||||
|
@ -461,3 +465,5 @@ static void resetRupt() {
|
|||
static void initResetButton() {
|
||||
attachInterrupt( resetPin, resetRupt, FALLING );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ compiler.elf2hex.cmd=avr-objcopy
|
|||
compiler.ldflags=
|
||||
compiler.size.cmd=avr-size
|
||||
# this can be overriden in boards.txt
|
||||
build.extra_flags=-D{build.usbtype}
|
||||
build.extra_flags=-D{build.usbtype} -D{build.board}
|
||||
|
||||
# AVR compile patterns
|
||||
# --------------------
|
||||
|
|
Loading…
Reference in a new issue