aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM8L/hal_lld.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/platforms/STM8L/hal_lld.h')
-rw-r--r--os/hal/platforms/STM8L/hal_lld.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/os/hal/platforms/STM8L/hal_lld.h b/os/hal/platforms/STM8L/hal_lld.h
index 8d658e6dc..45fcc29aa 100644
--- a/os/hal/platforms/STM8L/hal_lld.h
+++ b/os/hal/platforms/STM8L/hal_lld.h
@@ -16,6 +16,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
/**
* @file STM8L/hal_lld.h
* @brief STM8L HAL subsystem low level driver source.
@@ -26,6 +27,11 @@
* - LSECLK (@p 0 if disabled or frequency in Hertz).
* - LSEBYPASS (@p TRUE if external oscillator rather than a crystal).
* .
+ * One of the following macros must also be defined:
+ * - STM8L15X_MD for Medium Density devices.
+ * - STM8L15X_MDP for Medium Density Plus devices.
+ * - STM8L15X_HD for High Density devices.
+ * .
*
* @addtogroup HAL
* @{
@@ -37,15 +43,21 @@
#undef FALSE
#undef TRUE
-#if defined (STM8L15X_MD) || defined (STM8L15X_MDP) || defined (STM8L15X_HD)
#include "stm8l15x.h"
-#else
-#error "unsupported or invalid STM8L platform"
-#endif
#define FALSE 0
#define TRUE (!FALSE)
+#if defined (STM8L15X_MD)
+#include "hal_lld_stm8l_md.h"
+#elif defined (STM8L15X_MDP)
+#include "hal_lld_stm8l_mdp.h"
+#elif defined (STM8L15X_HD)
+#include "hal_lld_stm8l_hd.h"
+#else
+#error "unspecified, unsupported or invalid STM8L platform"
+#endif
+
/*===========================================================================*/
/* Driver constants. */
/*===========================================================================*/