add function to power-up/power-down FPGA
This commit is contained in:
parent
13a54079b1
commit
dd77bb2e0a
|
@ -0,0 +1,6 @@
|
|||
#ifndef _OSDR_FGPA_H
|
||||
#define _OSDR_FGPA_H
|
||||
|
||||
void osdr_fpga_power(int on);
|
||||
|
||||
#endif
|
|
@ -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);
|
||||
}
|
Reference in New Issue