Andy's Workshop Forums

General Category => stm32plus C++ library => Topic started by: zupazt3 on March 14, 2017, 05:59:30 am

Title: Why stm32Plus is not fully header-only?
Post by: zupazt3 on March 14, 2017, 05:59:30 am
Hi,

I'm just wondering: why isn't stm32plus fully header-only library? A lot of functions are inline and are included in *.h but some are in *.cpp.

Why is that? What are the props? What's the reasoning behind this?

I'm thinking about exercising a bit by writing my own library and I wonder why shouldn't I do it all as header-only?
Title: Re: Why stm32Plus is not fully header-only?
Post by: Andy Brown on March 18, 2017, 01:27:52 pm
Hi, it's really because the library evolved over the years towards header-only. If you're writing your own library then header only is the way to go in my opinion.

Watch out though for interrupt handlers. They must remain anchored to a fixed address so that the address can be inserted into the vector table.