From fa9b5ebc4030abf702e0a41ee0a434aa4ca38622 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Wed, 24 Jul 2019 12:12:40 -0400 Subject: [PATCH] removed old file --- afsk/main.c.x25_only | 85 -------------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 afsk/main.c.x25_only diff --git a/afsk/main.c.x25_only b/afsk/main.c.x25_only deleted file mode 100644 index 7a67a49c..00000000 --- a/afsk/main.c.x25_only +++ /dev/null @@ -1,85 +0,0 @@ -/* - * A sample application transmitting AFSK at 1200 baud - * - * Portions Copyright (C) 2018 Jonathan Brandenburg - * - * 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 3 of the License, 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. If not, see . - */ - -#include -#include -#include -#include -#include "status.h" -#include "ax5043.h" -#include "ax25.h" -#include "spi/ax5043spi.h" - -ax5043_conf_t hax5043; -ax25_conf_t hax25; - -static void init_rf(); - -int main(void) { - setSpiChannel(SPI_CHANNEL); - setSpiSpeed(SPI_SPEED); - initializeSpi(); - - init_rf(); - - ax25_init(&hax25, (uint8_t *) "CQ", '2', (uint8_t *) "DX", '2', - AX25_PREAMBLE_LEN, - AX25_POSTAMBLE_LEN); - - int ret; - uint8_t data[1024]; - // 0x03 is a UI frame - // 0x0F is no Level 3 protocol - const char *str = "\x03\x0fThis is an AX.25 Packet from CubeSatSim!!!"; - - /* Infinite loop */ - for (;;) { - sleep(2); - printf("INFO: Transmitting a packet\n"); - - memcpy(data, str, strnlen(str, 256)); - ret = ax25_tx_frame(&hax25, &hax5043, data, strnlen(str, 256)); - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - ax5043_wait_for_transmit(); - if (ret) { - fprintf(stderr, - "ERROR: Failed to transmit entire AX.25 frame with error code %d\n", - ret); - exit(EXIT_FAILURE); - } - - } - - return 0; -} - -static void init_rf() { - int ret; - ret = ax5043_init(&hax5043, XTAL_FREQ_HZ, VCO_INTERNAL); - if (ret != PQWS_SUCCESS) { - fprintf(stderr, - "ERROR: Failed to initialize AX5043 with error code %d\n", ret); - exit(EXIT_FAILURE); - } -}