реклама на сайте
подробности

 
 
> __attribute__ ((interrupt));
sergey sva
сообщение Feb 27 2009, 12:41
Сообщение #1


Гуру
******

Группа: Свой
Сообщений: 2 546
Регистрация: 23-05-07
Из: Самарская область Сызрань
Пользователь №: 27 923



В чем различие __attribute__ ((interrupt)); и __attribute__ ((interrupt("IRQ"))); в gcc ?
Go to the top of the page
 
+Quote Post
 
Start new topic
Ответов
mdmitry
сообщение Feb 27 2009, 14:54
Сообщение #2


Начинающий профессионал
*****

Группа: Свой
Сообщений: 1 215
Регистрация: 25-10-06
Из: СПб
Пользователь №: 21 648



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


--------------------
Наука изощряет ум; ученье вострит память. Козьма Прутков
Go to the top of the page
 
+Quote Post

Сообщений в этой теме


Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 21st July 2025 - 07:59
Рейтинг@Mail.ru


Страница сгенерированна за 0.01353 секунд с 7
ELECTRONIX ©2004-2016