Skip to content

Commit

Permalink
Merge branch 'Updates'
Browse files Browse the repository at this point in the history
  • Loading branch information
TMRh20 committed Oct 1, 2015
2 parents 2e5b360 + 517326e commit aab2576
Show file tree
Hide file tree
Showing 36 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ LIBNAME=$(LIB).so.1.0
HEADER_DIR=${PREFIX}/include/RF24

# The base location of support files for different devices
ARCH_DIR=arch
ARCH_DIR=utility

# The default objects to compile
OBJECTS=RF24.o spi.o
Expand Down
2 changes: 1 addition & 1 deletion Makefile.littlewire
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ LIB=librf24

HEADER_DIR=${PREFIX}/include/RF24
LIB_DIR=$(PREFIX)/lib
DRIVER_DIR=arch/LittleWire
DRIVER_DIR=utility/LittleWire

ifeq ($(shell uname), Linux)
DYN_SUFFIX=so
Expand Down
16 changes: 8 additions & 8 deletions RF24.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include "RF24_config.h"

#if defined (RF24_LINUX)
#include "arch/includes.h"
#include "utility/includes.h"
#elif LITTLEWIRE
#include <LittleWireSPI/LittleWireSPI.h>
#elif defined SOFTSPI
Expand Down Expand Up @@ -1333,7 +1333,7 @@ s *
*
* **March 2015**<br>
* - Uses SPI transactions on Arduino
* - New layout for <a href="Portability.html">easier portability:</a> Break out defines & includes for individual platforms to RF24/arch
* - New layout for <a href="Portability.html">easier portability:</a> Break out defines & includes for individual platforms to RF24/utility
* - <a href="MRAA.html">MRAA</a> support added ( Galileo, Edison, etc)
* - <a href="BBB.html">BBB/Generic Linux </a> support via spidev & MRAA
* - Support for RPi 2 added
Expand Down Expand Up @@ -1547,7 +1547,7 @@ s *
* BeagleBone Black is supported via MRAA or SPIDEV.
*
* @note The SPIDEV option should work with most Linux systems supporting SPIDEV. <br>
* Users may need to edit the RF24/arch/BBB/spi.cpp file to configure the spi device. (Defaults: "/dev/spidev1.0"; or "/dev/spidev1.1"; )
* Users may need to edit the RF24/utility/BBB/spi.cpp file to configure the spi device. (Defaults: "/dev/spidev1.0"; or "/dev/spidev1.1"; )
*
* <br>
* @section AutoInstall Automated Install
Expand Down Expand Up @@ -1713,7 +1713,7 @@ s *
*
* Build using **spidev**:
*
* 1. Edit the RF24/arch/BBB/spi.cpp file
* 1. Edit the RF24/utility/BBB/spi.cpp file
* 2. Change the default device definition to @code this->device = "/dev/spidev0.0";; @endcode
* 3. Run @code sudo make install -B RF24_SPIDEV=1 @endcode
* 4. See the gettingstarted example for an example of pin configuration
Expand Down Expand Up @@ -1829,13 +1829,13 @@ s *
* @page Portability RF24 Portability
*
* The RF24 radio driver mainly utilizes the <a href="http://arduino.cc/en/reference/homePage">Arduino API</a> for GPIO, SPI, and timing functions, which are easily replicated
* on various platforms. <br>Support files for these platforms are stored under RF24/arch, and can be modified to provide
* on various platforms. <br>Support files for these platforms are stored under RF24/utility, and can be modified to provide
* the required functionality.
*
* <br>
* @section Hardware_Templates Basic Hardware Template
*
* **RF24/arch**
* **RF24/utility**
*
* The RF24 library now includes a basic hardware template to assist in porting to various platforms. <br> The following files can be included
* to replicate standard Arduino functions as needed, allowing devices from ATTiny to Raspberry Pi to utilize the same core RF24 driver.
Expand All @@ -1850,13 +1850,13 @@ s *
* | your_custom_file.h | Provides access to custom drivers for spi,gpio, etc |
*
* <br>
* Examples are provided via the included hardware support templates in **RF24/arch** <br>
* Examples are provided via the included hardware support templates in **RF24/utility** <br>
* See the <a href="modules.html">modules</a> page for examples of class declarations
*
*<br>
* @section Device_Detection Device Detection
*
* 1. The main detection for Linux devices is done in the Makefile, with the includes.h from the proper hardware directory copied to RF24/arch/includes.h <br>
* 1. The main detection for Linux devices is done in the Makefile, with the includes.h from the proper hardware directory copied to RF24/utility/includes.h <br>
* 2. Secondary detection is completed in RF24_config.h, causing the include.h file to be included for all supported Linux devices <br>
* 3. RF24.h contains the declaration for SPI and GPIO objects 'spi' and 'gpio' to be used for porting-in related functions.
*
Expand Down
10 changes: 5 additions & 5 deletions RF24_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@
//Generic Linux/ARM and //http://iotdk.intel.com/docs/master/mraa/
#if ( defined (__linux) || defined (LINUX) ) && defined( __arm__ ) || defined(MRAA) // BeagleBone Black running GNU/Linux or any other ARM-based linux device

// The Makefile checks for bcm2835 (RPi) and copies the correct includes.h file to /arch/includes.h (Default is spidev config)
// The Makefile checks for bcm2835 (RPi) and copies the correct includes.h file to /utility/includes.h (Default is spidev config)
// This behavior can be overridden by calling 'make RF24_SPIDEV=1' or 'make RF24_MRAA=1'
// The includes.h file defines either RF24_RPi, MRAA or RF24_BBB and includes the correct RF24_arch_config.h file
#include "arch/includes.h"
#include "utility/includes.h"

//ATTiny
#elif defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)

#define RF24_TINY
#include "arch/ATTiny/RF24_arch_config.h"
#include "utility/ATTiny/RF24_arch_config.h"

//LittleWire
#elif defined(LITTLEWIRE)

#include "arch/LittleWire/RF24_arch_config.h"
#include "utility/LittleWire/RF24_arch_config.h"

//Teensy
#elif defined (TEENSYDUINO)

#include "arch/Teensy/RF24_arch_config.h"
#include "utility/Teensy/RF24_arch_config.h"
//Everything else
#else

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit aab2576

Please sign in to comment.