Tasmota/lib/lib_rf/RF24/utility/ATXMegaD3
Jason2866 e454c54e6d move libs in folder lib 2020-10-26 12:51:06 +00:00
..
README.md move libs in folder lib 2020-10-26 12:51:06 +00:00
RF24_arch_config.h move libs in folder lib 2020-10-26 12:51:06 +00:00
compatibility.c move libs in folder lib 2020-10-26 12:51:06 +00:00
compatibility.h move libs in folder lib 2020-10-26 12:51:06 +00:00
gpio.cpp move libs in folder lib 2020-10-26 12:51:06 +00:00
gpio.h move libs in folder lib 2020-10-26 12:51:06 +00:00
gpio_helper.c move libs in folder lib 2020-10-26 12:51:06 +00:00
gpio_helper.h move libs in folder lib 2020-10-26 12:51:06 +00:00
includes.h move libs in folder lib 2020-10-26 12:51:06 +00:00
spi.cpp move libs in folder lib 2020-10-26 12:51:06 +00:00
spi.h move libs in folder lib 2020-10-26 12:51:06 +00:00

README.md

This is a fork from http://tmrh20.github.io/RF24 which can be build as a static library for Atmel Studio 7.

Not all files are needed.

Just copy the following structure into a GCC Static Library project in AS7:

utility\
  ATXMega256D3\
    compatibility.c
    compatibility.h
    gpio.cpp
    gpio.h
    gpio_helper.c
    gpio_helper.h
    includes.h
    RF24_arch_config.h
    spi.cpp
    spi.h
nRF24L01.h
printf.h
RF24.cpp
RF24.h
RF24_config.h

Only ATXMega256D3 is supported right now!

Notes

The millisecond functionality is based on the TCE0 so don't use these pins as IO.

The operating frequency of the uC is 32MHz. If else change the TCE0 registers appropriatly in function __start_timer() in compatibility.c file for your frequency.

Usage

Add the library to your project! In the file where the main() is put the following in order to update the millisecond functionality:

ISR(TCE0_OVF_vect)
{
	update_milisec();
}

Declare the rf24 radio with RF24 radio(XMEGA_PORTC_PIN3, XMEGA_SPI_PORT_C);

First parameter is the CE pin which can be any available pin on the uC.

Second parameter is the CS which can be on port C (XMEGA_SPI_PORT_C) or on port D (XMEGA_SPI_PORT_D).

Call the __start_timer() to start the millisecond timer.

** For further information please see http://tmrh20.github.io/RF24 for all documentation**