Add platform independent delay abstraction
This commit is contained in:
parent
7a3079bbea
commit
a8c8ffc10a
1
Makefile
1
Makefile
@ -33,6 +33,7 @@ OPT = 3
|
|||||||
C_FLAGS += -O$(OPT) -g$(OPT)
|
C_FLAGS += -O$(OPT) -g$(OPT)
|
||||||
C_FLAGS += -Wall -Werror
|
C_FLAGS += -Wall -Werror
|
||||||
C_FLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
C_FLAGS += -ffunction-sections -fdata-sections -fno-strict-aliasing
|
||||||
|
C_FLAGS += -DPLATFORM_$(PLATFORM)
|
||||||
|
|
||||||
LIBS += c nosys m
|
LIBS += c nosys m
|
||||||
|
|
||||||
|
10
include/delay.h
Normal file
10
include/delay.h
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#ifndef __DELAY_H__
|
||||||
|
#define __DELAY_H__
|
||||||
|
|
||||||
|
#if defined(PLATFORM_nrf52)
|
||||||
|
#include "nrf_delay.h"
|
||||||
|
|
||||||
|
#define delay_ms nrf_delay_ms
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user