Microchip® Advanced Software Framework

remote_task.c File Reference

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  ,
 
)

The PDCA interrupt handler.

References flag_eot, pdca_disable_interrupt_transfer_complete(), and REMOTE_PDCA_CHANNEL_USART.

static void pdca_set_irq_usart ( void  )
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().

static void remote_task_pdca_start ( void  )
static

volatile bool flag_eot = false

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]