51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
/*
|
|
* peripheral.h
|
|
*
|
|
* Created: 07.05.2014 14:02:16
|
|
* Author: netz
|
|
*/
|
|
|
|
|
|
#ifndef PERIPHERAL_H_
|
|
#define PERIPHERAL_H_
|
|
|
|
#define F_CPU 8000000
|
|
|
|
//#include "io/hardware/portb.hpp"
|
|
#include "io/hardware/portc.hpp"
|
|
//#include "io/hardware/portd.hpp"
|
|
|
|
#include "io/Led.hpp"
|
|
typedef Led<
|
|
avrlib::portc, //LED an PORTD
|
|
PINC0 //Rot
|
|
> ledclass;
|
|
|
|
#include "io/uart.hpp"
|
|
typedef Uart<
|
|
9600
|
|
> uartclass;
|
|
|
|
#include "io/Spi.hpp"
|
|
typedef Spi< //<typename Port, int cspin, int misopin, int mosipin, int sckpin, int mode>
|
|
avrlib::portc, //Funkmodul an PORTC
|
|
PINC3, //CS Pin (nSEL)
|
|
PINC4, //MISO Pin (SDO)
|
|
PINC1, //MOSI Pin (SDI)
|
|
PINC2, //SCK Pin
|
|
1 //0 Hardware, 1 Software
|
|
> spiclass;
|
|
|
|
#include "io/rfm12.hpp"
|
|
typedef Rfm12<
|
|
spiclass, //SPI Hardware
|
|
1, //Bandwidth // 400kHz Bandbreite, 0dB Verstärkung, DRSSI threshold: -61dBm
|
|
0, //Gain
|
|
7, //DRRSI
|
|
433920,//(uint16_t)RF12FREQ(433.92), // Sende/Empfangsfrequenz auf 433,92MHz einstellen
|
|
9600, //Baudrate // 9600 baud
|
|
0, //Power // 1mW Ausgangsleistung, 120kHz Frequenzshift
|
|
6 //Mod
|
|
> rfm12class;
|
|
|
|
#endif /* PERIPHERAL_H_ */ |