Помощь - Поиск - Пользователи - Календарь
Полная версия этой страницы: __attribute__ ((interrupt));
Форум разработчиков электроники ELECTRONIX.ru > Микроконтроллеры (MCs) > Cредства разработки для МК > GNU/OpenSource средства разработки
sergey sva
В чем различие __attribute__ ((interrupt)); и __attribute__ ((interrupt("IRQ"))); в gcc ?
mdmitry
из man gcc 4.3.2

Код
interrupt
    Use this attribute on the ARM, AVR, CRX, M32C, M32R/D, m68k, MS1, and Xstormy16 ports to indicate that the specified function is an interrupt handler. The compiler will generate function entry and exit sequences suitable for use in an interrupt handler when this attribute is present.

    Note, interrupt handlers for the Blackfin, H8/300, H8/300H, H8S, and SH processors can be specified via the interrupt_handler attribute.

    Note, on the AVR, interrupts will be enabled inside the function.

    Note, for the ARM, you can specify the kind of interrupt to be handled by adding an optional parameter to the interrupt attribute like this:

              void f () __attribute__ ((interrupt ("IRQ")));
        

    Permissible values for this parameter are: IRQ, FIQ, SWI, ABORT and UNDEF.

    On ARMv7-M the interrupt type is ignored, and the attribute means the function may be called with a word aligned stack pointer.


RTFM, IMHO!
Для просмотра полной версии этой страницы, пожалуйста, пройдите по ссылке.
Invision Power Board © 2001-2025 Invision Power Services, Inc.