Перейти к содержанию
    

__attribute__ ((interrupt));

В чем различие __attribute__ ((interrupt)); и __attribute__ ((interrupt("IRQ"))); в gcc ?

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

из 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!

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...