Update usart dir

This commit is contained in:
CVR
2021-09-13 11:02:29 +12:00
parent fc7211c4a1
commit 1f41c5d920
2 changed files with 21 additions and 14 deletions

View File

@@ -9,7 +9,7 @@
#define F_CPU 8000000UL
#include "../../src/mrf24j.h"
#include "../usart.h"
#include "../usart/src/usart.h"
#include "../../src/driver.h"
#include <avr/interrupt.h>
#include <util/delay.h>
@@ -32,15 +32,20 @@ int main() {
mrf.address16_write(0x4201);
mrf.handlers(&handle_rx, &handle_tx);
//mrf.enable_wake();
mrf.set_bufferPHY(true);
mrf.turbo();
mrf.set_power(0b1100000);
//mrf.set_bufferPHY(true);
//mrf.turbo();
//mrf.set_power(0b1100000);
//mrf.sleep();
sei();
printf("Started\n\r");
int i = 0;
char tmp[20];
while(1) {
printf("txxxing...\n\r");
//mrf.wake();
mrf.send16(0x4202, "Tx Hello");
sprintf(tmp,"Received %i\n\r", i++);
mrf.send16(0x4202, tmp);
_delay_ms(2000);
}