BeRTOS
|
AFSK1200 modem. More...
#include "afsk.h"
#include <net/ax25.h>
#include "cfg/cfg_afsk.h"
#include "hw/hw_afsk.h"
#include <drv/timer.h>
#include <cfg/module.h>
#include <cfg/log.h>
#include <cpu/power.h>
#include <cpu/pgm.h>
#include <struct/fifobuf.h>
#include <string.h>
Go to the source code of this file.
Defines | |
#define | SIN_LEN 512 |
Full wave length. | |
Functions | |
uint8_t | sin_sample (uint16_t idx) |
Given the index, this function computes the correct sine sample based only on the first quarter of wave. | |
static bool | hdlc_parse (Hdlc *hdlc, bool bit, FIFOBuffer *fifo) |
High-Level Data Link Control parsing function. | |
void | afsk_adc_isr (Afsk *af, int8_t curr_sample) |
ADC ISR callback. | |
uint8_t | afsk_dac_isr (Afsk *af) |
DAC ISR callback. | |
void | afsk_init (Afsk *af, int adc_ch, int dac_ch) |
Initialize an AFSK1200 modem. | |
Variables | |
static const uint8_t PROGMEM | sin_table [] |
Sine table for the first quarter of wave. |
AFSK1200 modem.
Definition in file afsk.c.
void afsk_adc_isr | ( | Afsk * | af, |
int8_t | curr_sample | ||
) |
uint8_t afsk_dac_isr | ( | Afsk * | af | ) |
void afsk_init | ( | Afsk * | af, |
int | adc_ch, | ||
int | dac_ch | ||
) |
static bool hdlc_parse | ( | Hdlc * | hdlc, |
bool | bit, | ||
FIFOBuffer * | fifo | ||
) | [static] |
const uint8_t PROGMEM sin_table[] [static] |
{ 128, 129, 131, 132, 134, 135, 137, 138, 140, 142, 143, 145, 146, 148, 149, 151, 152, 154, 155, 157, 158, 160, 162, 163, 165, 166, 167, 169, 170, 172, 173, 175, 176, 178, 179, 181, 182, 183, 185, 186, 188, 189, 190, 192, 193, 194, 196, 197, 198, 200, 201, 202, 203, 205, 206, 207, 208, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 234, 235, 236, 237, 238, 238, 239, 240, 241, 241, 242, 243, 243, 244, 245, 245, 246, 246, 247, 248, 248, 249, 249, 250, 250, 250, 251, 251, 252, 252, 252, 253, 253, 253, 253, 254, 254, 254, 254, 254, 255, 255, 255, 255, 255, 255, 255, }
Sine table for the first quarter of wave.
The rest of the wave is computed from this first quarter. This table is used to generate the modulated data.