Skip to content
Snippets Groups Projects
Commit 41d7e6b2 authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Header file cleanup

parent 63879aec
No related branches found
No related tags found
No related merge requests found
...@@ -13,9 +13,6 @@ SIZE = arm-none-eabi-size ...@@ -13,9 +13,6 @@ SIZE = arm-none-eabi-size
# The name of your project (used to name the compiled .hex file) # The name of your project (used to name the compiled .hex file)
TARGET = fc-boot TARGET = fc-boot
# configurable options
OPTIONS = -DF_CPU=48000000
# Sources # Sources
C_FILES = \ C_FILES = \
mk20dx128.c \ mk20dx128.c \
......
...@@ -31,24 +31,9 @@ ...@@ -31,24 +31,9 @@
#ifndef _mk20dx128_h_ #ifndef _mk20dx128_h_
#define _mk20dx128_h_ #define _mk20dx128_h_
//#define F_CPU 96000000 #define F_CPU 48000000
//#define F_CPU 48000000 #define F_BUS 48000000
//#define F_CPU 24000000 #define F_MEM 24000000
//#define F_BUS 48000000
//#define F_BUS 24000000
//#define F_MEM 24000000
#if (F_CPU == 96000000)
#define F_BUS 48000000
#define F_MEM 24000000
#elif (F_CPU == 48000000)
#define F_BUS 48000000
#define F_MEM 24000000
#elif (F_CPU == 24000000)
#define F_BUS 24000000
#define F_MEM 24000000
#endif
#ifndef NULL #ifndef NULL
#define NULL ((void *)0) #define NULL ((void *)0)
......
...@@ -31,24 +31,9 @@ ...@@ -31,24 +31,9 @@
#ifndef _mk20dx128_h_ #ifndef _mk20dx128_h_
#define _mk20dx128_h_ #define _mk20dx128_h_
//#define F_CPU 96000000 #define F_CPU 48000000
//#define F_CPU 48000000 #define F_BUS 48000000
//#define F_CPU 24000000 #define F_MEM 24000000
//#define F_BUS 48000000
//#define F_BUS 24000000
//#define F_MEM 24000000
#if (F_CPU == 96000000)
#define F_BUS 48000000
#define F_MEM 24000000
#elif (F_CPU == 48000000)
#define F_BUS 48000000
#define F_MEM 24000000
#elif (F_CPU == 24000000)
#define F_BUS 24000000
#define F_MEM 24000000
#endif
#ifndef NULL #ifndef NULL
#define NULL ((void *)0) #define NULL ((void *)0)
...@@ -1604,7 +1589,17 @@ extern void portd_isr(void); ...@@ -1604,7 +1589,17 @@ extern void portd_isr(void);
extern void porte_isr(void); extern void porte_isr(void);
extern void software_isr(void); extern void software_isr(void);
static inline void watchdog_refresh(void)
{
WDOG_REFRESH = 0xA602;
WDOG_REFRESH = 0xB480;
}
static inline void watchdog_reboot(void)
{
// Any invalid write to the WDOG registers will trigger an immediate reboot
WDOG_REFRESH = 0;
}
#ifdef __cplusplus #ifdef __cplusplus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment