add function to power-up/power-down FPGA

This commit is contained in:
Harald Welte 2011-12-29 22:30:41 +01:00
parent 13a54079b1
commit dd77bb2e0a
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,6 @@
#ifndef _OSDR_FGPA_H
#define _OSDR_FGPA_H
void osdr_fpga_power(int on);
#endif

12
firmware/src/osdr_fpga.c Normal file
View File

@ -0,0 +1,12 @@
#include <pio/pio.h>
static const Pin fon_pin = PIN_FON;
void osdr_fpga_power(int on)
{
if (on)
PIO_Set(&fon_pin);
else
PIO_Clear(&fon_pin);
}