pecanpico10/tracker/software/threads/rxtx/radio.h

35 wiersze
934 B
C

#ifndef __RADIO_H__
#define __RADIO_H__
#include "ch.h"
#include "hal.h"
#include "config.h"
#include "ax25_pad.h"
#include "pktconf.h"
// APRS region frequencies
#define APRS_FREQ_OTHER 144800000
#define APRS_FREQ_AMERICA 144390000
#define APRS_FREQ_CHINA 144640000
#define APRS_FREQ_JAPAN 144660000
#define APRS_FREQ_SOUTHKOREA 144620000
#define APRS_FREQ_SOUTHEASTASIA 144390000
#define APRS_FREQ_AUSTRALIA 145175000
#define APRS_FREQ_NEWZEALAND 144575000
#define APRS_FREQ_ARGENTINA 144930000
#define APRS_FREQ_BRAZIL 145575000
void start_rx_thread(uint32_t freq, uint16_t step,
radio_ch_t chan, uint8_t rssi);
bool transmitOnRadio(packet_t pp, uint32_t freq, uint16_t step, uint8_t chan,
uint8_t pwr, mod_t mod);
inline const char *getModulation(uint8_t key) {
const char *val[] = {"NONE", "AFSK", "2FSK"};
return val[key];
};
#endif /* __RADIO_H__ */