Project

General

Profile

RE: SPI interface for ADC5560 (MityDSP L138F) » ADS5560.h

Vivek Ponnani, 07/24/2017 03:40 PM

 
1
/**
2
 * @file 		ADS5560.h
3
 * @author		James Thesing <james.thesing@criticallink.com>
4
 * @version		1.0
5
 *
6
 * @section LICENSE
7
 *
8
 *
9
 *    o  0
10
 *    | /       Copyright (c) 2005-2011
11
 *  (CL)---o   Critical Link, LLC
12
 *    \
13
 *     O
14
 *
15
 *
16
 * @section DESCRIPTION
17
 *
18
 * This class handles exercising the ADS5560 on the DSP. Input data is
19
 * acquired through an analog source, and capture data is sent back
20
 * to the ARM.
21
 */
22

    
23
#ifndef ADS5560_H_
24
#define ADS5560_H_
25

    
26
#include "ADS5560.h"
27
#include "core/DspUpp.h"
28

    
29
#include <stdint.h>
30
#include <std.h>
31
#include <tsk.h>
32
#include <clk.h>
33
#include <vector>
34

    
35

    
36

    
37
class ADS5560{
38
public:
39

    
40
	/**
41
	 * Get a pointer to the singleton ADS5560 object.
42
	 *
43
	 * @return A pointer to the singleton object.
44
	 */
45

    
46
	static ADS5560* getInstance();
47

    
48
	/**
49
	 * Gets data from the upp interface
50
	 * @param SAMPLE_SIZE amount of samples to collect
51
	 */
52
	void getData( int SAMPLE_SIZE );
53

    
54

    
55

    
56
private:
57

    
58
	/**
59
	 * Private Constructor - forces getInstance() use
60
	 */
61
	ADS5560();
62

    
63
	/**
64
	 * Destructor
65
	 */
66
	~ADS5560();
67

    
68
	/**
69
	 * Initialize DSP link
70
	 */
71
	void init();
72

    
73

    
74
	static ADS5560* mpUppSignal; //!< Pointer to the singleton.
75
	bool filled; //!<ensures table is filled only once
76
	const MityDSP::tcDspUpp::teUppChan meXmitChan; //!< Constant for
77
			//!< transmit channel.
78
	static const uint32_t uppFreq = 50000000; //!<freq of upp
79
	MityDSP::tcDspUpp* mpDspUpp; //!< Pointer to uPP driver singleton.
80
	MBX_Handle mhXmitMbx; //!< Handle to transmit mailbox.
81
	const MityDSP::tcDspUpp::teUppChan meRecvChan; //!< Constant for
82
			//!< receive channel.
83
	MBX_Handle mhRecvMbx; //!< Handle to receive mailbox.
84

    
85
};
86

    
87
#endif /*ADS5560_H_*/
(1-1/4) Go to top
Add picture from clipboard (Maximum size: 1 GB)