Commit c9feaf51 authored by TMRh20's avatar TMRh20

Merge branch 'master' of https://github.com/TMRh20/RF24

parents 3e8147a1 c7212598
...@@ -27,6 +27,11 @@ HEADER_DIR=${PREFIX}/include/RF24 ...@@ -27,6 +27,11 @@ HEADER_DIR=${PREFIX}/include/RF24
# The base location of support files for different devices # The base location of support files for different devices
ARCH_DIR=utility ARCH_DIR=utility
ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif
# The default objects to compile # The default objects to compile
OBJECTS=RF24.o spi.o OBJECTS=RF24.o spi.o
...@@ -57,7 +62,7 @@ OBJECTS+=bcm2835.o ...@@ -57,7 +62,7 @@ OBJECTS+=bcm2835.o
OBJECTS+=interrupt.o OBJECTS+=interrupt.o
SHARED_LINKER_FLAGS+=-pthread SHARED_LINKER_FLAGS+=-pthread
# The recommended compiler flags for the Raspberry Pi # The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
else else
DRIVER_DIR=$(ARCH_DIR)/BBB DRIVER_DIR=$(ARCH_DIR)/BBB
......
...@@ -43,7 +43,7 @@ bool TX=1,RX=0,role=0, transferInProgress = 0; ...@@ -43,7 +43,7 @@ bool TX=1,RX=0,role=0, transferInProgress = 0;
void setup(void) { void setup(void) {
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
radio.begin(); // Setup and configure rf radio radio.begin(); // Setup and configure rf radio
......
...@@ -108,7 +108,7 @@ void setup(void) ...@@ -108,7 +108,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/examples/led_remote/\n\r"); printf("\n\rRF24/examples/led_remote/\n\r");
printf("ROLE: %s\n\r",role_friendly_name[role]); printf("ROLE: %s\n\r",role_friendly_name[role]);
......
...@@ -58,7 +58,7 @@ void setup(void) ...@@ -58,7 +58,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\r\nRF24/examples/nordic_fob/\r\n"); printf("\r\nRF24/examples/nordic_fob/\r\n");
......
...@@ -50,7 +50,7 @@ void setup(void) ...@@ -50,7 +50,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/examples/scanner/\n\r"); printf("\n\rRF24/examples/scanner/\n\r");
......
...@@ -128,7 +128,7 @@ void setup(void) ...@@ -128,7 +128,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/examples/starping/\n\r"); printf("\n\rRF24/examples/starping/\n\r");
printf("ROLE: %s\n\r",role_friendly_name[role]); printf("ROLE: %s\n\r",role_friendly_name[role]);
......
...@@ -16,9 +16,14 @@ prefix := /usr/local ...@@ -16,9 +16,14 @@ prefix := /usr/local
# Detect the Raspberry Pi by the existence of the bcm_host.h file # Detect the Raspberry Pi by the existence of the bcm_host.h file
BCMLOC=/opt/vc/include/bcm_host.h BCMLOC=/opt/vc/include/bcm_host.h
ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif
ifneq ("$(wildcard $(BCMLOC))","") ifneq ("$(wildcard $(BCMLOC))","")
# The recommended compiler flags for the Raspberry Pi # The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
endif endif
# define all programs # define all programs
......
...@@ -13,8 +13,13 @@ ...@@ -13,8 +13,13 @@
# #
prefix := /usr/local prefix := /usr/local
ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif
# The recommended compiler flags for the Raspberry Pi # The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
#CCFLAGS= #CCFLAGS=
# define all programs # define all programs
......
...@@ -62,7 +62,7 @@ int main(int argc, char** argv) ...@@ -62,7 +62,7 @@ int main(int argc, char** argv)
// Print preamble // Print preamble
// //
//Serial.begin(57600); //Serial.begin(115200);
//printf_begin(); //printf_begin();
printf("RF24/examples/scanner/\n"); printf("RF24/examples/scanner/\n");
......
...@@ -13,12 +13,17 @@ ...@@ -13,12 +13,17 @@
# #
prefix := /usr/local prefix := /usr/local
ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif
# Detect the Raspberry Pi by the existence of the bcm_host.h file # Detect the Raspberry Pi by the existence of the bcm_host.h file
BCMLOC=/opt/vc/include/bcm_host.h BCMLOC=/opt/vc/include/bcm_host.h
ifneq ("$(wildcard $(BCMLOC))","") ifneq ("$(wildcard $(BCMLOC))","")
# The recommended compiler flags for the Raspberry Pi # The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=armv6zk -mtune=arm1176jzf-s CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
endif endif
# define all programs # define all programs
......
name=RF24 name=RF24
version=1.1.4 version=1.1.5
author=TMRh20 author=TMRh20
maintainer=TMRh20 maintainer=TMRh20
sentence=A library for NRF24L01(+) communication. sentence=A library for NRF24L01(+) communication.
......
...@@ -80,7 +80,7 @@ void setup(void) ...@@ -80,7 +80,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/examples/pingpair_irq/\n\r"); printf("\n\rRF24/examples/pingpair_irq/\n\r");
printf("ROLE: %s\n\r",role_friendly_name[role]); printf("ROLE: %s\n\r",role_friendly_name[role]);
......
...@@ -114,7 +114,7 @@ void setup(void) ...@@ -114,7 +114,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/tests/pingpair_blocking/\n\r"); printf("\n\rRF24/tests/pingpair_blocking/\n\r");
printf("ROLE: %s\n\r",role_friendly_name[role]); printf("ROLE: %s\n\r",role_friendly_name[role]);
......
...@@ -136,7 +136,7 @@ void setup(void) ...@@ -136,7 +136,7 @@ void setup(void)
// Print preamble // Print preamble
// //
Serial.begin(57600); Serial.begin(115200);
printf_begin(); printf_begin();
printf("\n\rRF24/tests/pingpair_test/\n\r"); printf("\n\rRF24/tests/pingpair_test/\n\r");
printf("ROLE: %s\n\r",role_friendly_name[role]); printf("ROLE: %s\n\r",role_friendly_name[role]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment