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.
48 lines
924 B
48 lines
924 B
/*
|
|
|
|
W5100 device configuration
|
|
|
|
Author:
|
|
|
|
Philip Lindsay <follower@rancidbacon.com>
|
|
|
|
License:
|
|
|
|
Copyright 2007-2008 // LGPL
|
|
|
|
*/
|
|
|
|
#ifndef _W5100_DEVICE_H_
|
|
#define _W5100_DEVICE_H_
|
|
|
|
// From original driver
|
|
#include "types.h"
|
|
#include "w5100.h"
|
|
#include "socket.h"
|
|
|
|
// Required for use in Arduino environment
|
|
#include <WConstants.h>
|
|
|
|
class W5100Device {
|
|
|
|
public:
|
|
W5100Device(int resetPin);
|
|
|
|
void setIp(byte b0, byte b1, byte b2, byte b3);
|
|
void setMask(byte b0, byte b1, byte b2, byte b3);
|
|
void setGateway(byte b0, byte b1, byte b2, byte b3);
|
|
void setMac(byte b0, byte b1, byte b2, byte b3, byte b4, byte b5);
|
|
|
|
void _init(void);
|
|
|
|
private:
|
|
byte * _packBuffer(byte b0, byte b1, byte b2, byte b3);
|
|
byte * _packBuffer(byte b0, byte b1, byte b2, byte b3, byte b4, byte b5);
|
|
|
|
int _resetPin;
|
|
|
|
byte _scratchBuffer[6]; // TODO: Can we make this static?
|
|
};
|
|
|
|
#endif
|