You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
836 B
44 lines
836 B
/*
|
|
|
|
SPI Configuration
|
|
|
|
Author:
|
|
|
|
Philip Lindsay <follower@rancidbacon.com>
|
|
|
|
License:
|
|
|
|
Copyright 2007-2008 // LGPL
|
|
|
|
*/
|
|
|
|
#ifndef _SPI_H_
|
|
#define _SPI_H_
|
|
|
|
// Define SPI-related pins
|
|
#define PIN_DATA_OUT 11 // MOSI (Master Out / Slave In)
|
|
#define PIN_DATA_IN 12 // MISO (Master In / Slave Out)
|
|
#define PIN_SPI_CLOCK 13 // SCK (Serial Clock)
|
|
// TODO: Define this elsewhere as this is specific to the network module.
|
|
#define PIN_SLAVE_SELECT 10 // SS (Slave Select)
|
|
|
|
// Required for use in Arduino environment
|
|
#include <WConstants.h>
|
|
|
|
class SpiConfiguration {
|
|
/*
|
|
|
|
Handles SPI configuration with an API consistent
|
|
with the style of existing Arduino 'HardwareSerial' class.
|
|
|
|
Needs to be used before SPI functionality is accessed.
|
|
|
|
*/
|
|
|
|
public:
|
|
SpiConfiguration();
|
|
void begin(void);
|
|
};
|
|
|
|
#endif
|