MotionSensor working

This commit is contained in:
Henrik Ekblad
2015-09-12 00:34:44 +02:00
parent 15918b3d3d
commit bdae50886b
143 changed files with 15417 additions and 500 deletions
+2 -2
View File
@@ -47,8 +47,8 @@ typedef enum { RF24_CRC_DISABLED = 0, RF24_CRC_8, RF24_CRC_16 } rf24_crclength_e
class RF24
{
private:
#ifdef SOFTSPI
SoftSPI<SOFT_SPI_MISO_PIN, SOFT_SPI_MOSI_PIN, SOFT_SPI_SCK_PIN, SPI_MODE> spi;
#ifdef MY_SOFTSPI
SoftSPI<MY_SOFT_SPI_MISO_PIN, MY_SOFT_SPI_MOSI_PIN, MY_SOFT_SPI_SCK_PIN, SPI_MODE> spi;
#elif defined (SPI_UART)
SPIUARTClass uspi;
#endif
+11 -9
View File
@@ -11,7 +11,7 @@
#ifndef __RF24_CONFIG_H__
#define __RF24_CONFIG_H__
#include <MyConfig.h>
#include "MyConfig.h"
#if ARDUINO < 100
#include <WProgram.h>
@@ -38,17 +38,19 @@
#if defined SPI_UART
#include <SPI_UART.h>
#define _SPI uspi
#elif defined SOFTSPI
// change these pins to your liking
//const uint8_t SOFT_SPI_MISO_PIN = 16; // <-- Moved to MyConfig.h
//const uint8_t SOFT_SPI_MOSI_PIN = 15; // <-- Moved to MyConfig.h
//const uint8_t SOFT_SPI_SCK_PIN = 14; // <-- Moved to MyConfig.h
#elif defined MY_SOFTSPI
#include "drivers/DigitalIO/DigitalIO.h"
const uint8_t SPI_MODE = 0;
#define _SPI spi
// change these pins to your liking
const uint8_t SOFT_SPI_MISO_PIN = MY_SOFT_SPI_MOSI_PIN;
const uint8_t SOFT_SPI_MOSI_PIN = MY_SOFT_SPI_MISO_PIN;
const uint8_t SOFT_SPI_SCK_PIN = MY_SOFT_SPI_SCK_PIN;
const uint8_t SPI_MODE = 0;
#define _SPI spi
#else
#include <SPI.h>
#include "drivers/SPI/SPI.h"
#define _SPI SPI
#endif
#endif