Change the rtx_packet function to a more generic rtx_data

master
Philip Heron 2010-06-08 09:06:47 +01:00
rodzic 2cdbd1ca31
commit effffecc69
2 zmienionych plików z 5 dodań i 5 usunięć

8
rtty.c
Wyświetl plik

@ -9,9 +9,9 @@
#include "config.h"
#include <stdint.h>
#include <io.h>
#include <avr/io.h>
#include <util/delay.h>
#include <pgmspace.h>
#include <avr/pgmspace.h>
#define RTTY_BAUD (300)
#define RTTY_DELAY (1000000 / RTTY_BAUD)
@ -68,10 +68,10 @@ void rtx_string_P(PGM_P s)
while((b = pgm_read_byte(s++)) != '\0') rtx_byte(b);
}
void rtx_packet(uint8_t *packet)
void rtx_data(uint8_t *data, size_t length)
{
int b;
for(b = 0; b <= PKT_SIZE; b++) rtx_byte(packet[b]);
for(b = 0; b < length; b++) rtx_byte(data[b]);
}
void rtx_init()

2
rtty.h
Wyświetl plik

@ -16,7 +16,7 @@
extern void rtx_baud(int baud);
extern void rtx_string(char *s);
extern void rtx_string_P(PGM_P s);
extern void rtx_packet(uint8_t *packet);
extern void rtx_data(uint8_t *data, size_t length);
extern void rtx_init();
#endif