Initial commit of files
This commit is contained in:
@ -0,0 +1,32 @@
|
||||
# Copyright 2014 Jared Boone <jared@sharebrained.com>
|
||||
#
|
||||
# This file is part of HackRF.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING. If not, write to
|
||||
# the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
cmake_minimum_required(VERSION 2.8.9)
|
||||
set(CMAKE_TOOLCHAIN_FILE ../toolchain-arm-cortex-m.cmake)
|
||||
|
||||
project(simpletx)
|
||||
|
||||
include(../hackrf-common.cmake)
|
||||
|
||||
set(SRC_M4
|
||||
simpletx.c
|
||||
)
|
||||
|
||||
DeclareTargets()
|
||||
@ -0,0 +1,23 @@
|
||||
This program activates the MAX2837 transceiver to transmit an unmodulated
|
||||
carrier.
|
||||
|
||||
Required Lemondrop -> Jellybean connections:
|
||||
|
||||
SCK: Lemondrop P3 pin 2 -> Jellybean P9 2
|
||||
CS_XCVR: Lemondrop P3 pin 3 -> Jellybean P9 3
|
||||
MOSI: Lemondrop P3 pin 4 -> Jellybean P9 4
|
||||
CS_AD: Lemondrop P3 pin 5 -> Jellybean P9 5
|
||||
MISO: Lemondrop P3 pin 6 -> Jellybean P9 6
|
||||
ENABLE: Lemondrop P6 pin 12 -> Jellybean P7 pin 12
|
||||
RXENABLE: Lemondrop P6 pin 13 -> Jellybean P7 pin 13
|
||||
TXENABLE: Lemondrop P6 pin 15 -> Jellybean P7 pin 15
|
||||
SCL: Lemondrop P7 pin 3 -> Jellybean P6 pin 3
|
||||
SDA: Lemondrop P7 pin 5 -> Jellybean P6 pin 5
|
||||
SDA: Lemondrop P7 pin 6 -> Jellybean P6 pin 6
|
||||
VCC: Lemondrop P4 pin 2, 4, or 6 -> Jellybean P17 pin 2, 4, or 6
|
||||
GND: Lemondrop P5 -> Jellybean P13
|
||||
|
||||
For now we are running everything at 3.3 V, but in the future we may also
|
||||
require:
|
||||
|
||||
1V8: Lemondrop P11 pin 2, 4, or 6 -> Jellybean P16 pin 2, 4, or 6
|
||||
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2012 Michael Ossmann
|
||||
*
|
||||
* This file is part of HackRF.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#include <libopencm3/lpc43xx/gpio.h>
|
||||
#include <libopencm3/lpc43xx/scu.h>
|
||||
#include <libopencm3/lpc43xx/i2c.h>
|
||||
#include <libopencm3/lpc43xx/ssp.h>
|
||||
|
||||
#include "hackrf_core.h"
|
||||
#include "max2837.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
const uint32_t freq = 2441000000U;
|
||||
|
||||
pin_setup();
|
||||
enable_1v8_power();
|
||||
#ifdef HACKRF_ONE
|
||||
enable_rf_power();
|
||||
#endif
|
||||
cpu_clock_init();
|
||||
ssp1_init();
|
||||
|
||||
gpio_set(PORT_LED1_3, (PIN_LED1)); /* LED1 on */
|
||||
|
||||
ssp1_set_mode_max2837();
|
||||
max2837_setup();
|
||||
gpio_set(PORT_LED1_3, (PIN_LED2)); /* LED2 on */
|
||||
max2837_set_frequency(freq);
|
||||
max2837_start();
|
||||
max2837_tx();
|
||||
gpio_set(PORT_LED1_3, (PIN_LED3)); /* LED3 on */
|
||||
while (1);
|
||||
max2837_stop();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user