EmbDev.net

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


von Roman M. (romez777)


Rate this post
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.

von Martin T. (mthomas) (Moderator)


Rate this post
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.

von Roman M. (romez777)


Rate this post
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..

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.