MAXREFDES71# Code Documentation  V01.00
MAXREFDES71# 2-Channel Analog Input/Analog Output
 All Data Structures Files Functions Variables Macros Pages
maximDeviceSpecificUtilities.c File Reference
#include "xbasic_types.h"
#include "stdio.h"
#include "xscugic.h"
#include "axi_millbrae.h"
#include "utilities.h"

Go to the source code of this file.

Macros

#define INTC_DEVICE_INT_ID   91
 

Functions

int SetupInterruptSystem (XScuGic *IntcInstancePtr)
 Setup the interrupt handler.
 
u32 start_sampling (u32 unSampleSize, int nSampleRate, u16 *auSamplesCh1, u16 *auSamplesCh2)
 Receive a block of samples at a constant rate.
 
void signal_replication (int nRepRate)
 Continuously reproduce the analog input signals on the outputs.
 
void continuous_sampling (int nChannel)
 Continuously reads the ADC and display the data via the HyperTerminal.
 

Variables

u32 g_unCount =0
 
u16 * g_auSamplesCh1
 
u16 * g_auSamplesCh2
 
u32 g_unSampleSize
 
u8 g_uchReadADCHandlerStop =1
 

Detailed Description


      Project: MAXREFDES71#
     Filename: maximDeviceSpecificUtilities.c
  Description: This module uses the AXI_MILLBRAE custom ip core Ver 1.00a to
               control the ADC and DAC on MAXREFDES71#.  These
               low level functions could be cut/pasted into the user's
               application as a starting point for development of an end
               application.

Revision History:
12-17-13 Rev 01.00 GL Initial Release


This code follows the following naming conventions:


char chPmodValue
char (array) sPmodString[16]
float fPmodValue
int nPmodValue
int (array) anPmodValue[16]
u16 uPmodValue
u16 (array) auPmodValue[16]
u8 uchPmodValue
u8 (array) auchPmodBuffer[16]
unsigned int unPmodValue
int * punPmodValue


Definition in file maximDeviceSpecificUtilities.c.

Macro Definition Documentation

#define INTC_DEVICE_INT_ID   91

Definition at line 70 of file maximDeviceSpecificUtilities.c.

Function Documentation

void continuous_sampling ( int  nChannel)

Continuously reads the ADC and display the data via the HyperTerminal.

Details
This function reads the ADC every half of a second and display the data
via the Hyperterminal. Press the ESC key to return to the main menu.
Parameters
Channel- selected ADC channel number
Return values
None

Definition at line 225 of file maximDeviceSpecificUtilities.c.

int SetupInterruptSystem ( XScuGic *  IntcInstancePtr)

Setup the interrupt handler.

Details
This function connects the interrupt handler to the processor
Parameters
[in]*IntcInstancePtr- IntcInstancePtr is the instance of the interrupt controller
Return values
XST_SUCCESSto indicate success, otherwise XST_FAILURE

Definition at line 285 of file maximDeviceSpecificUtilities.c.

void signal_replication ( int  nRepRate)

Continuously reproduce the analog input signals on the outputs.

Details
This function reads the ADCs and replicates on the outputs at
Press the ESC key to return to the main menu.
Parameters
None
Return values
None

Definition at line 173 of file maximDeviceSpecificUtilities.c.

u32 start_sampling ( u32  unSampleSize,
int  nSampleRate,
u16 *  auSamplesCh1,
u16 *  auSamplesCh2 
)

Receive a block of samples at a constant rate.

Details
This function is used to receive a block of samples at a constant
sampling rate. The size of the block is defined in u16 *auSampleSize.
And the sampling rate is defined in int nSampleRate. The Sampled data
will be stored in an array *auSamplesChx
Parameters
[in]unSampleSize- Sample size
[in]nSampleRate- Sample rate
[out]*auSamplesChx- sampled data
Return values
Numberof samples received

Definition at line 81 of file maximDeviceSpecificUtilities.c.

Variable Documentation

u16* g_auSamplesCh1

Definition at line 76 of file maximDeviceSpecificUtilities.c.

u16* g_auSamplesCh2

Definition at line 77 of file maximDeviceSpecificUtilities.c.

u8 g_uchReadADCHandlerStop =1

Definition at line 79 of file maximDeviceSpecificUtilities.c.

u32 g_unCount =0

Definition at line 75 of file maximDeviceSpecificUtilities.c.

u32 g_unSampleSize

Definition at line 78 of file maximDeviceSpecificUtilities.c.