mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
atusb/fw2/: move board-specific items to board-specific file
- io.h: renamed to board.h - Makefile (OBJS): added board.o - atusb.c (reset_rf): moved to board.c - board.h (reset_rf): give reset_rf a proper declaration - atusb.c, ep.c, spi.c: include board.h instead of io.h
This commit is contained in:
20
atusb/fw2/board.c
Normal file
20
atusb/fw2/board.c
Normal file
@@ -0,0 +1,20 @@
|
||||
#include <avr/io.h>
|
||||
|
||||
#define F_CPU 8000000UL
|
||||
#include <util/delay.h>
|
||||
|
||||
#include "board.h"
|
||||
|
||||
|
||||
void reset_rf(void)
|
||||
{
|
||||
/* AT86RF231 data sheet, 12.4.13, reset pulse width: 625 ns (min) */
|
||||
|
||||
CLR(nRST_RF);
|
||||
_delay_us(1);
|
||||
SET(nRST_RF);
|
||||
|
||||
/* 12.4.14: SPI access latency after reset: 625 ns (min) */
|
||||
|
||||
_delay_us(1);
|
||||
}
|
||||
Reference in New Issue
Block a user