aboutsummaryrefslogtreecommitdiff
path: root/mcu/sys-mkl27z.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2016-05-31 11:49:01 +0900
committerNIIBE Yutaka <gniibe@fsij.org>2016-05-31 11:49:01 +0900
commit3a4e1f2bd59a5185e638a2552c64344d78e0f54f (patch)
treea25424f8b4264ab8c8485b5c086102061e885e4d /mcu/sys-mkl27z.h
parent421fd8019b31386c6e689753cf0a2ff35bd2af50 (diff)
Cleanup of sys and its macro
Diffstat (limited to 'mcu/sys-mkl27z.h')
-rw-r--r--mcu/sys-mkl27z.h38
1 files changed, 18 insertions, 20 deletions
diff --git a/mcu/sys-mkl27z.h b/mcu/sys-mkl27z.h
index eed5d92..855cc62 100644
--- a/mcu/sys-mkl27z.h
+++ b/mcu/sys-mkl27z.h
@@ -1,30 +1,12 @@
extern const uint8_t sys_version[8];
+#if defined(USE_SYS3) || defined(USE_SYS_BOARD_ID)
extern const uint32_t sys_board_id;
extern const char *const sys_board_name;
+#endif
typedef void (*handler)(void);
extern handler sys_vector[16];
-/*
- * Users can override INLINE by 'attribute((used))' to have an
- * implementation defined.
- */
-#if !defined(INLINE)
-#define INLINE __inline__
-#endif
-
-static INLINE void
-clock_init (void)
-{
- (*sys_vector[0]) ();
-}
-
-static INLINE void
-gpio_init (void)
-{
- (*sys_vector[1]) ();
-}
-
static inline void
set_led (int on)
{
@@ -39,3 +21,19 @@ void crc32_u32 (unsigned int *, unsigned int);
int flash_erase_page (uint32_t addr);
int flash_program_word (uint32_t addr, uint32_t word);
+
+#ifdef REQUIRE_CLOCK_GPIO_SETTING_IN_SYS
+/* Provide the function entries. */
+
+static void __attribute__ ((used))
+clock_init (void)
+{
+ (*sys_vector[0]) ();
+}
+
+static void __attribute__ ((used))
+gpio_init (void)
+{
+ (*sys_vector[1]) ();
+}
+#endif