* interrupt handling
@ 2001-09-07 19:23 mop
0 siblings, 0 replies; 5+ messages in thread
From: mop @ 2001-09-07 19:23 UTC (permalink / raw)
there's this business called pragma Attach_Handler and as such I was told to
use this to implement my interrupt handling. so now here's what i wnat to
do;
1. when i send a "certain" command (based on user selection) as part of my
data (serial) stream
2. i want to wait 200 ms for the device on the other end to respond with
interrupt
3. if i get said interrupt within 200ms I need to synchronize with
interrupt and send "certain" command again... now keep doing that.
4. if i DONT get interrupt within 200ms of wait from device on other end.
send certain command again. if yet again no from "certain" command. send a
different command.
Here's what i got but I dont know how to tie (1-4) above into this (below)
so now in my spec.
pragma Attach_Handler(IIOF2_Interrupt, Interrupt_Names.IIOF2,
Handler_CS_NT);
in the body
procedure IIOF2_Interrupt is
pragma SUPPRESS(Storage_Check);
begin
-- clear interrupt with whatever hardware using.
exception
when others =>
-- exception handler here
end IIOF2_Interrupt;
^ permalink raw reply [flat|nested] 5+ messages in thread
* interrupt handling
@ 2014-10-30 14:39 salimsajad
2014-10-30 20:28 ` Jacob Sparre Andersen
0 siblings, 1 reply; 5+ messages in thread
From: salimsajad @ 2014-10-30 14:39 UTC (permalink / raw)
Hi
I need a sample code which demonstrates interrupt handling for ada. I am using a powerpc bareboard with greenhils Adamulti compiler. Thanks in advance.
Salim
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: interrupt handling
2014-10-30 14:39 interrupt handling salimsajad
@ 2014-10-30 20:28 ` Jacob Sparre Andersen
2014-10-31 5:45 ` salimsajad
0 siblings, 1 reply; 5+ messages in thread
From: Jacob Sparre Andersen @ 2014-10-30 20:28 UTC (permalink / raw)
salimsajad@gmail.com writes:
> I need a sample code which demonstrates interrupt handling for ada. I
> am using a powerpc bareboard with greenhils Adamulti compiler. Thanks
> in advance.
There is one in the Ada Reference Manual, C.3.2(28/3).
Greetings,
Jacob
--
"Those who will not reason, are bigots,
those who cannot, are fools, and
those who dare not, are slaves."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: interrupt handling
2014-10-30 20:28 ` Jacob Sparre Andersen
@ 2014-10-31 5:45 ` salimsajad
2014-10-31 20:57 ` Tero Koskinen
0 siblings, 1 reply; 5+ messages in thread
From: salimsajad @ 2014-10-31 5:45 UTC (permalink / raw)
Thanks Jacob
As I am new to ada I am finding it difficult because information in LRM is very less.
I am using greenhils adamulty on freescale mpc555 evaluation board. If a sample project demonstrates interrupt handling in this bareboard it will be a great help.
Salim.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: interrupt handling
2014-10-31 5:45 ` salimsajad
@ 2014-10-31 20:57 ` Tero Koskinen
0 siblings, 0 replies; 5+ messages in thread
From: Tero Koskinen @ 2014-10-31 20:57 UTC (permalink / raw)
31.10.2014 7:45, salimsajad@gmail.com wrote:
> Thanks Jacob
> As I am new to ada I am finding it difficult because information in LRM is very less.
>
> I am using greenhils adamulty on freescale mpc555 evaluation board. If a sample project demonstrates interrupt handling in this bareboard it will be a great help.
>
> Salim.
>
AVR-Ada and projects using it contain some real examples.
They probably won't work directly as-is on Freescale board and different
Ada compiler, but should point to right direction.
For example, see
https://bitbucket.org/tkoskine/arduino-blog/src/627aecd9f9dbd1848782f62396f2ef1b36f76319/examples/button-interrupt/button.adb?at=default
https://bitbucket.org/tkoskine/arduino-eeprom/src/ef73feacfe4b5c8d7ed621b55ac713cd07f13877/two_wire.adb?at=default#cl-236
http://sourceforge.net/p/avr-ada/code/ci/master/tree/avr/avr_lib/avr-real_time-clock_impl.adb
Yours,
Tero
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-31 20:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-30 14:39 interrupt handling salimsajad
2014-10-30 20:28 ` Jacob Sparre Andersen
2014-10-31 5:45 ` salimsajad
2014-10-31 20:57 ` Tero Koskinen
-- strict thread matches above, loose matches on Subject: below --
2001-09-07 19:23 mop
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox