Changeset - 9716361162e0
[Not reviewed]
default
0 5 0
ethanzonca@CL-SEC241-08.cedarville.edu - 12 years ago 2012-11-08 15:40:33
ethanzonca@CL-SEC241-08.cedarville.edu
ax25 implementation complete (compiles)
5 files changed with 27 insertions and 6 deletions:
0 comments (0 inline, 0 general)
master/master/config.h
Show inline comments
 
@@ -9,7 +9,19 @@
 
#ifndef CONFIG_H_
 
#define CONFIG_H_
 
 
#define F_CPU 11059200
 
#define MODULE_ID '1'
 
 
// --------------------------------------------------------------------------
 
// AX.25 config (ax25.c)
 
// --------------------------------------------------------------------------
 

	
 
// TX delay in milliseconds
 
#define TX_DELAY      300
 

	
 
// Maximum packet delay
 
#define MAX_PACKET_LEN 512  // bytes
 
 
 
 
#endif /* CONFIG_H_ */
 
\ No newline at end of file
master/master/lib/afsk.c
Show inline comments
 
@@ -2,13 +2,14 @@
 
 * fsk.c
 
 *
 
 * Created: 10/29/2012 7:40:34 PM
 
 *  Author: ethanzonca
 
 */
 

	
 
#define F_CPU 11059200
 

	
 
#include "../config.h"
 

	
 
#include <stdint.h>
 
#include <stdbool.h>
 
#include <avr/io.h>
 
#include <avr/interrupt.h> 
 
#include <util/delay.h>
master/master/lib/afsk.h
Show inline comments
 
@@ -6,12 +6,17 @@
 
 */ 
 
 
 
#ifndef AFSK_H_
 
#define AFSK_H_
 
 
// Private
 
void afsk_output_sample(uint8_t s);
 
void afsk_timer_stop();
 
 
// Public
 
void afsk_setup();
 
void afsk_test();
 
void afsk_send(const uint8_t *buffer, int len);
 
int afsk_busy();
 
void afsk_start();
 
master/master/lib/ax25.c
Show inline comments
 
@@ -2,19 +2,18 @@
 
 * ax25.c
 
 *
 
 * Created: 10/30/2012 12:16:41 PM
 
 *  Author: ethanzonca
 
 */ 
 
 
/*
 

	
 
#include <inttypes.h>
 
#include "../config.h"
 
#include "ax25.h"
 
#include "afsk.h"
 

	
 
// Module constants
 
#define MAX_PACKET_LEN 512  // bytes
 

	
 
// Module globals
 
static uint16_t crc;
 
static uint8_t ones_in_a_row;
 
static uint8_t packet[MAX_PACKET_LEN];
 
static unsigned int packet_size;
 

	
 
@@ -131,7 +130,6 @@ void ax25_send_footer()
 
void ax25_flush_frame()
 
{
 
	// Key the transmitter and send the frame
 
	afsk_send(packet, packet_size);
 
	afsk_start();
 
}
 
*/
 
\ No newline at end of file
master/master/lib/ax25.h
Show inline comments
 
@@ -6,12 +6,17 @@
 
 */ 
 
 
 
#ifndef AX25_H_
 
#define AX25_H_
 
 
struct s_address {
 
	char callsign[7];
 
	unsigned char ssid;
 
};
 
 
void ax25_send_byte(uint8_t a_byte);
 
void ax25_send_flag();
 
void ax25_send_string(const char *string);
 
void ax25_send_header(const struct s_address *addresses, int num_addresses);
 
void ax25_send_footer();
 
void ax25_flush_frame();
0 comments (0 inline, 0 general)