pi4
F5OEO 2019-06-27 08:58:34 +01:00 zatwierdzone przez f5oeo
rodzic c9714b2a7d
commit 5b5a4ee083
4 zmienionych plików z 22 dodań i 8 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
all: testrpitx
CFLAGS = -Wall -g -O3 -Wno-unused-variable
LDFLAGS = -lm -lrt -lpthread
CFLAGS = -Wall -g -O3 -Wno-unused-variable -I /opt/vc/include
LDFLAGS = -lm -lrt -lpthread -L/opt/vc/lib -lbcm_host
CCP = g++
CC = gcc

Wyświetl plik

@ -701,6 +701,13 @@ void SimpleTestAtv(uint64_t Freq)
}
}
void info(void)
{
clkgpio clk;
clk.print_clock_tree();
}
static void
terminate(int num)
{
@ -723,7 +730,7 @@ int main(int argc, char *argv[])
sa.sa_handler = terminate;
sigaction(i, &sa, NULL);
}
dbg_setlevel(0);
dbg_setlevel(1);
//SimpleTest(Freq);
//SimpleTestbpsk(Freq);
//SimpleTestFileIQ(Freq);
@ -733,6 +740,9 @@ int main(int argc, char *argv[])
//SimpleTestBurstFsk(Freq);
//SimpleTestOOKTiming(Freq);
//AlectoOOK(Freq);
RfSwitchOOK(Freq);
//RfSwitchOOK(Freq);
//SimpleTestbpsk(Freq);
//SimpleTestAtv(Freq);
info();
}

Wyświetl plik

@ -1,6 +1,6 @@
CFLAGS = -Wall -O3 -Wno-unused-variable
CXXFLAGS = -std=c++11 -Wall -O3 -Wno-unused-variable
LDFLAGS = -lm -lrt -lpthread
CXXFLAGS = -std=c++11 -Wall -O3 -Wno-unused-variable -I /opt/vc/include
LDFLAGS = -lm -lrt -lpthread -L/opt/vc/lib -lbcm_host
CCP = c++
CC = cc

Wyświetl plik

@ -25,6 +25,8 @@ extern "C" {
#include <sys/timex.h>
#include <math.h>
#include "util.h"
#include <bcm_host.h>
//#include "/opt/vc/include/bcm_host.h"
gpio::gpio(uint32_t base, uint32_t len)
{
@ -42,7 +44,9 @@ gpio::~gpio()
uint32_t gpio::GetPeripheralBase()
{
RASPBERRY_PI_INFO_T info;
uint32_t BCM2708_PERI_BASE = 0;
uint32_t BCM2708_PERI_BASE = bcm_host_get_peripheral_address();
dbg_printf(1,"Peri Base = %x\n",BCM2708_PERI_BASE);
/*
if (getRaspberryPiInformation(&info) > 0)
{
if (info.peripheralBase == RPI_BROADCOM_2835_PERIPHERAL_BASE)
@ -54,7 +58,7 @@ uint32_t gpio::GetPeripheralBase()
{
BCM2708_PERI_BASE = info.peripheralBase;
}
}
}*/
return BCM2708_PERI_BASE;
}