Question

Embedded System Programming What are the benefits and what are the drawback of using hardware abstraction...

Embedded System Programming

What are the benefits and what are the drawback of using hardware abstraction (HAL macros and fuctions),

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A hardware abstraction layer(HAL) is included in many OS to avoid modifying the OS kernel to run the program on computers with varying hardware architecture.

The major difference between macro and functions is , function is compiled and macro is preprocessed.

BENEFITS OF MACROS AND FUNCTIONS::

  • Speed of Execution using Macro is Faster
  • No Type Checking is done in Macro
  • Macros are useful when small code is repeated many times
  • Functions are useful when large code is to be written
  • Using Function keeps the code length unaffected

DRAWBACKS OF MACROS AND FUNCTIONS::

  • Use of macro can lead to side effect at later stages
  • Speed of Execution using Function is Slower
  • Macro does not check any Compile-Time Errors
Add a comment
Know the answer?
Add Answer to:
Embedded System Programming What are the benefits and what are the drawback of using hardware abstraction...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT