Programm for decoding radio-signals sent by a ETH-Window-Shutter-Contact, received with a RFM12B-module

Dependencies:   TextLCD mbed

Embed: (wiki syntax)

« Back to documentation index

rfm12b Class Reference

rfm12b Class Reference

This Class handles a rfm12b transceiver see http://www.hoperf.com/rf_fsk/rfm12b.htm. More...

#include <rfm12b.h>

Public Member Functions

 rfm12b (PinName mosi, PinName miso, PinName sclk, PinName nsel, PinName rxdata)
 Create a rfm12b object.
void init_spi ()
 init the spi-interface
void RFM_init (void)
 initialize the device
uint16_t rfm_spi16 (uint16_t outval)
 write and read 16 bit
void attachISR (void(*fptr)(void))
 attach a function to be called when the data-pin changes from 0->1 and from 1->0 this function has to do all the decoding keep this function short, as no interrrupts can occour within
template<typename T >
void attachISR (T *tptr, void(T::*mptr)(void))
 attach an object member function to be called when the data-pin changes from 0->1 and from 1->0

Detailed Description

This Class handles a rfm12b transceiver see http://www.hoperf.com/rf_fsk/rfm12b.htm.

Definition at line 18 of file rfm12b.h.


Constructor & Destructor Documentation

rfm12b ( PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  nsel,
PinName  rxdata 
)

Create a rfm12b object.

Class rfm12b for RFM12B transceiver module http://www.hoperf.com/rf_fsk/rfm12b.htm.

Parameters:
mosiSPI-Interface. One of the 2 PSI-Interfaces of mbed. Pin p5 or p11
misoSPI-Interface. One of the 2 PSI-Interfaces of mbed. Pin p6 or p12
sclkSPI-Interface. One of the 2 PSI-Interfaces of mbed. Pin p7 or p13
nselChip-Select. A Digial Output of mbed
rxdataData-Pin for received data. A DigitalIn of mbed

rfm12b object

Definition at line 18 of file rfm12b.cpp.


Member Function Documentation

void attachISR ( void(*)(void)  fptr )

attach a function to be called when the data-pin changes from 0->1 and from 1->0 this function has to do all the decoding keep this function short, as no interrrupts can occour within

Parameters:
fptrPointer to callback-function

Definition at line 48 of file rfm12b.h.

void attachISR ( T *  tptr,
void(T::*)(void)  mptr 
)

attach an object member function to be called when the data-pin changes from 0->1 and from 1->0

Parameters:
tptrpointer to object
mprtpointer ro member function

Definition at line 60 of file rfm12b.h.

void init_spi (  )

init the spi-interface

init the spi-communication

Definition at line 29 of file rfm12b.cpp.

void RFM_init ( void   )

initialize the device

Definition at line 41 of file rfm12b.cpp.

uint16_t rfm_spi16 ( uint16_t  outval )

write and read 16 bit

write and read 16 bit to device

Definition at line 136 of file rfm12b.cpp.