EmbeddedRelated.com

Cesar Providenti (@cprovidenti)

Elec. Eng. programming various types of real-time systems since 1995. (Earlier work was on off-line support software for flight simulators.)

Re: When is a State Machine not a State Machine?

Reply posted 4 years ago (07/27/2020)
I much prefer this (Pedro's) response, and would take it one step further.A (finite) state machine is a mathematical construct, and as such is represented via mathematical...

Re: Do I need this mask and cast?

Reply posted 4 years ago (07/07/2020)
The cast annoys the hell out of me, because it is so self-evidently redundant (even without referring to the return value of the function), and as a result, reduces...

Re: Software Bugs

Reply posted 4 years ago (05/27/2020)
This is not exactly an answer to the original question, but here's a trick to use just in case you find yourself "forced" to write a function or two in assembler:Write...
Good question. (I, for one, do not know.)
Without the use of the div function, negative quotients may be rounded towards zero or away from zero, which makes implementing a portable "round quotient to nearest...
The reference for these kinds of questions is Andrew Koenig: C Traps and Pitfalls.As I recall, the answers are exactly as you were told, sadly enough.And don't get...
So what is the range then: 0 to 100 or -32768 to 32767?In many cases, the size is determined by something outside the processor, so there you should use the appropriate size-specific...
How about using unsigned int and (signed) int, unless you have a specific need to use a particular size? That's precisely their purpose, as I recall.E.g., in the...

Re: strcmp help please

Reply posted 4 years ago (04/07/2020)
Good suggestion, but beware of the "gotcha" concerning the length passed to strncmp: which length do you specify, the length of the string you expect to receive,...

Re: Funny or Not Funny?

Reply posted 4 years ago (02/13/2020)
Maybe not "offend" per se, but perhaps "upset"? One of my co-workers comes from China, and his entire family is "trapped" in the quarantined region. They're fine...

Re: Preventing Forum Fatigue

Reply posted 5 years ago (01/18/2019)
Thumbs up with this reply (also), with one caveat: I would defer creating the "newbies" forum (or sub-forum) for now, as there is only one (so-called) "newbie" to...

Re: Cooperative scheduling

Reply posted 6 years ago (06/01/2018)
A very good twist on this topic. That said, I would see such schedulers as, in effect, bare metal, but with an API (and/or a framework) to support the context switch...

Re: RTOS vs Bare-Metal

Reply posted 6 years ago (05/08/2018)
Sometimes you have to port multi-threaded code from (for example) Linux to an embedded MCU, and you do not have time [i.e., are not given the time!] to rework the...

Use this form to contact cprovidenti

Before you can contact a member of the *Related Sites:

  • You must be logged in (register here)
  • You must confirm you email address