блин все съело //*----------------------------------------------------------------------------
//* \fn AT91F_PMC_EnablePeriphClock
//* \brief Enable peripheral clock
//*----------------------------------------------------------------------------
AT91F_PMC_EnablePeriphClock(
AT91C_BASE_PMC, // PIO controller base address
((unsigned int) 1 << AT91C_ID_PIOB));
//*****************************************************************
//set pin as unput and enable pullup
AT91F_PIO_CfgInput(
(AT91PS_PIO)AT91C_BASE_PIOB,
((unsigned int) AT91C_PIO_PB22)
);
AT91F_PIO_CfgPullup(
(AT91PS_PIO)AT91C_BASE_PIOB,
((unsigned int) AT91C_PIO_PB22)
);
//((AT91PS_PIO)AT91C_BASE_PIOB)->PIO_PPUER = (unsigned int) AT91C_PIO_PB22;
//*****************************************************************
//if Jumper not set
if (((*AT91C_PIOB_PDSR) & AT91C_PIO_PB22) != 0)
{
AT91F_PMC_DisablePeriphClock(
AT91C_BASE_PMC, // PIO controller base address
((unsigned int) 1 << AT91C_ID_PIOB));
RUN_MY(); // Передача управления программе пользователя.
}