EmbDev.net

Forum: ARM programming with GCC/GNU tools functions and timers


Author: Roman Mashak (romez777)
Posted on:

Rate this post
0 useful
not useful
Hello.

I have functions called 'Func1' and 'Func2'. Both exploit USB CDC
routines taken from Atmel appnote, but they do a little different, i.e.
thay accept connections from different PC applications.
I'd like to do something like this: if there is no connection to Func1
within 30sec, then jump to Func2.

Probably I should use timers, but I'm not sure how.
Do you have any perhaps better ideas?

Thanks.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Roman Mashak wrote:
> Hello.
>
> I have functions called 'Func1' and 'Func2'. Both exploit USB CDC
> routines taken from Atmel appnote, but they do a little different, i.e.
> thay accept connections from different PC applications.
> I'd like to do something like this: if there is no connection to Func1
> within 30sec, then jump to Func2.
>
> Probably I should use timers, but I'm not sure how.
> Do you have any perhaps better ideas?

Just try it as described and ask more specifically if something does not
work.

Author: Roman Mashak (romez777)
Posted on:

Rate this post
0 useful
not useful
Martin Thomas wrote:
>> I'd like to do something like this: if there is no connection to Func1
>> within 30sec, then jump to Func2.
>>
>> Probably I should use timers, but I'm not sure how.
>> Do you have any perhaps better ideas?
>
> Just try it as described and ask more specifically if something does not
> work.

Hm... The point is I don't know how to do this: wait for connection via
USB from update Win32 application, and if nothihg has come up, jump to
another part of code, which is also communicating via USB but with
another Win32 application :)  A bit tricky..

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.