Remote Task Control.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include "compiler.h"
#include "dsp.h"
#include "pdca.h"
#include "gpio.h"
#include "usart.h"
#include "print_funcs.h"
#include "remote_task.h"
Macros | |
#define | FRAME_PRIVILEGIED_CMD 0x00 |
#define | FRAME_SEND_NOISE_CMD 0x11 |
#define | FRAME_SEND_SIGNAL_FILTER_DSP_CMD 0x13 |
#define | FRAME_SEND_SIGNAL_FILTER_FPU_CMD 0x14 |
#define | FRAME_SEND_SIGNALIN_CMD 0x10 |
#define | FRAME_SEND_SIGNALIN_NOISE_CMD 0x12 |
Functions | |
ISR (pdca_int_handler_usart, AVR32_PDCA_IRQ_GROUP2, 1) | |
The PDCA interrupt handler. More... | |
static void | pdca_set_irq_usart (void) |
Local definition for Set IRQ function of USART through PDCA. More... | |
void | remote_task (void) |
Remote Task: More... | |
void | remote_task_init (void) |
Remote Task Init: More... | |
static void | remote_task_pdca_start (void) |
Local definition to start PDCA transfer function. More... | |
Variables | |
volatile bool | flag_eot = false |
volatile float | signalin_noise_remote [GUI_BUFFER_LENGTH] |
Reference to Signal In + Noise Signal Buff in floating point Format scaled for the remote task. More... | |
volatile float | signalout_fp_remote [GUI_BUFFER_LENGTH] |
Reference to Filtered Signal through 16-bit fixed point Format scaled for the remote task. More... | |
volatile float | signalout_fpu_remote [GUI_BUFFER_LENGTH] |
Reference to Filtered Signal through floating point Format scaled for the remote task. More... | |
volatile uint8_t | txbuf [REMOTE_TXBUF_SIZE] |
#define FRAME_PRIVILEGIED_CMD 0x00 |
#define FRAME_SEND_NOISE_CMD 0x11 |
#define FRAME_SEND_SIGNAL_FILTER_DSP_CMD 0x13 |
Referenced by remote_task().
#define FRAME_SEND_SIGNAL_FILTER_FPU_CMD 0x14 |
Referenced by remote_task().
#define FRAME_SEND_SIGNALIN_CMD 0x10 |
#define FRAME_SEND_SIGNALIN_NOISE_CMD 0x12 |
Referenced by remote_task().
ISR | ( | pdca_int_handler_usart | , |
AVR32_PDCA_IRQ_GROUP2 | , | ||
1 | |||
) |
The PDCA interrupt handler.
References flag_eot, pdca_disable_interrupt_transfer_complete(), and REMOTE_PDCA_CHANNEL_USART.
|
static |
Local definition for Set IRQ function of USART through PDCA.
Init interrupt controller and register pdca_int_handler interrupt.
References cpu_irq_restore(), cpu_irq_save(), and irq_register_handler.
Referenced by remote_task_pdca_start().
void remote_task | ( | void | ) |
Remote Task:
References flag_eot, FRAME_SEND_SIGNAL_FILTER_DSP_CMD, FRAME_SEND_SIGNAL_FILTER_FPU_CMD, FRAME_SEND_SIGNALIN_NOISE_CMD, GUI_BUFFER_LENGTH, i, j, remote_task_pdca_start(), signalin_noise_remote, signalout_fp_remote, signalout_fpu_remote, tmp, and txbuf.
Referenced by main().
void remote_task_init | ( | void | ) |
Remote Task Init:
References usart_options_t::baudrate, gpio_enable_module(), remote_task_pdca_start(), REMOTE_USART, REMOTE_USART_RX_FUNCTION, REMOTE_USART_RX_PIN, REMOTE_USART_TX_FUNCTION, REMOTE_USART_TX_PIN, sysclk_get_pba_hz(), USART_1_STOPBIT, usart_init_rs232(), USART_NO_PARITY, and USART_NORMAL_CHMODE.
Referenced by main().
|
static |
Local definition to start PDCA transfer function.
References pdca_channel_options_t::addr, NULL, pdca_enable(), pdca_enable_interrupt_transfer_complete(), pdca_init_channel(), pdca_set_irq_usart(), PDCA_TRANSFER_SIZE_BYTE, REMOTE_PDCA_CHANNEL_USART, REMOTE_TXBUF_SIZE, and txbuf.
Referenced by remote_task(), and remote_task_init().
Referenced by ISR(), and remote_task().
volatile float signalin_noise_remote[GUI_BUFFER_LENGTH] |
Reference to Signal In + Noise Signal Buff in floating point Format scaled for the remote task.
Referenced by filter_task(), noise_task(), and remote_task().
volatile float signalout_fp_remote[GUI_BUFFER_LENGTH] |
Reference to Filtered Signal through 16-bit fixed point Format scaled for the remote task.
Referenced by filter_task(), and remote_task().
volatile float signalout_fpu_remote[GUI_BUFFER_LENGTH] |
Reference to Filtered Signal through floating point Format scaled for the remote task.
Referenced by filter_task(), and remote_task().
volatile uint8_t txbuf[REMOTE_TXBUF_SIZE] |
Referenced by remote_task(), and remote_task_pdca_start().