Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* e-gadget.header
- * main.c
- *
- * Created on: 2015-04-07
- * Modyfied: 2015-04-07 19:45:16
- * Author: Nefarious19
- *
- * Project name: "NRF24"
- *
- *
- * MCU: ATmega32
- * F_CPU: 16 000 000 Hz
- *
- * Flash: 2 992 bytes [ 9,1 % ]
- * RAM: 189 bytes [ 9,2 % ]
- * EEPROM: 0 bytes [ 0,0 % ]
- *
- */
- #include <avr/io.h>
- #include <util/delay.h>
- #include <avr/interrupt.h>
- #include <stdlib.h>
- #include <string.h>
- #include <avr/pgmspace.h>
- //
- #include "UART/Uart.h"
- #include "nRF24L01.h"
- void moja_funkcja ( void * nRF_RX_buff , uint8_t len );
- volatile uint16_t timer100ms;
- int main (void)
- {
- //inicjalizacja uarta
- USART_Init(_UBRR);
- //inicjalizacja nRFa
- nRF_init();
- register_nRF_RX_Event_Callback(moja_funkcja);
- //zezwolenie na przerwania
- sei();
- nRF_RX_Power_Up(); //odpalamy nRFA!
- while(1)
- {
- nRF_RX_EVENT();
- }
- }
- void moja_funkcja ( void * nRF_RX_buff, uint8_t len )
- {
- USART_Transmit_string(nRF_RX_buff);
- }
Add Comment
Please, Sign In to add comment