@@ -22,22 +22,38 | |||||
22 | #ifndef APB_FFT_DRIVER_H |
|
22 | #ifndef APB_FFT_DRIVER_H | |
23 | #define APB_FFT_DRIVER_H |
|
23 | #define APB_FFT_DRIVER_H | |
24 |
|
24 | |||
25 | #define FFT_Empty 0x00100 |
|
25 | /*! \file apb_fft_Driver.h | |
26 | #define FFT_Full 0x01000 |
|
26 | \brief LPP FFT driver. | |
|
27 | ||||
|
28 | This library is written to work with LPP_APB_FFT VHDL module from LPP's FreeVHDLIB. It calculate a fast fourier transforms, | |||
|
29 | from an input data table. | |||
|
30 | ||||
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |||
|
32 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |||
|
33 | */ | |||
|
34 | ||||
|
35 | #define FFT_Empty 0x00100 /**< Used to know when the data can be send to the FFT module */ | |||
|
36 | #define FFT_Full 0x01000 /**< Used to know when the data can be send to the FFT module */ | |||
27 |
|
37 | |||
28 |
|
38 | |||
29 | /*=================================================== |
|
39 | /*=================================================== | |
30 | T Y P E S D E F |
|
40 | T Y P E S D E F | |
31 | ====================================================*/ |
|
41 | ====================================================*/ | |
32 |
|
42 | /*! \struct FFT_Driver | ||
|
43 | \brief Sturcture representing the fft registers | |||
|
44 | */ | |||
33 | struct FFT_Driver |
|
45 | struct FFT_Driver | |
34 | { |
|
46 | { | |
35 | int RWDataReg; |
|
47 | int RWDataReg; /**< \brief Data register Write/Read */ | |
36 | int ReadAddrReg; |
|
48 | int ReadAddrReg; /**< \brief Address register for the reading operation */ | |
37 | int ConfigReg; |
|
49 | int ConfigReg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] | |
38 | int Dummy1; |
|
50 | Write enable Flag [HEX 1] | |
39 | int Dummy0; |
|
51 | Empty Flag [HEX 2] | |
40 | int WriteAddrReg; |
|
52 | Full Flag [HEX 3] | |
|
53 | Dummy "C" [HEX 4/5/6/7] */ | |||
|
54 | int Dummy1; /**< \brief Unused register, aesthetic interest */ | |||
|
55 | int Dummy0; /**< \brief Unused register, aesthetic interest */ | |||
|
56 | int WriteAddrReg; /**< \brief Address register for the writing operation */ | |||
41 | }; |
|
57 | }; | |
42 |
|
58 | |||
43 | typedef struct FFT_Driver FFT_Device; |
|
59 | typedef struct FFT_Driver FFT_Device; | |
@@ -46,10 +62,36 typedef struct FFT_Driver FFT_Device; | |||||
46 | /*=================================================== |
|
62 | /*=================================================== | |
47 | F U N C T I O N S |
|
63 | F U N C T I O N S | |
48 | ====================================================*/ |
|
64 | ====================================================*/ | |
49 |
|
65 | /*! \fn FFT_Device* openFFT(int count); | ||
|
66 | \brief Return count FFT. | |||
|
67 | ||||
|
68 | This Function scans APB devices table and returns count FFT. | |||
|
69 | ||||
|
70 | \param count The number of the FFT you whant to get. For example if you have 3 FFTS on your SOC you want | |||
|
71 | to use FFT1 so count = 2. | |||
|
72 | \return The pointer to the device. | |||
|
73 | */ | |||
50 | FFT_Device* openFFT(int count); |
|
74 | FFT_Device* openFFT(int count); | |
51 | int FftInput(int Tbl[],FFT_Device*); |
|
75 | ||
52 |
int Fft |
|
76 | /*! \fn int FftInput(int Tbl[],FFT_Device*); | |
|
77 | \brief Fill in the Input for the FFT | |||
|
78 | ||||
|
79 | This function provides the data used by the FFT | |||
|
80 | ||||
|
81 | \param Tbl[] The Table which contains the Data. | |||
|
82 | \param dev The FFT pointer. | |||
|
83 | */ | |||
|
84 | int FftInput(int Tbl[],FFT_Device* dev); | |||
|
85 | ||||
|
86 | /*! \fn int FftOutput(int Tbl[],FFT_Device*); | |||
|
87 | \brief Save data from the FFT | |||
|
88 | ||||
|
89 | This function save the data generated by the FFT | |||
|
90 | ||||
|
91 | \param Tbl[] The Table which will contains the Data. | |||
|
92 | \param dev The FFT pointer. | |||
|
93 | */ | |||
|
94 | int FftOutput(int Tbl[],FFT_Device* dev); | |||
53 |
|
95 | |||
54 |
|
96 | |||
55 |
|
97 |
@@ -21,22 +21,37 | |||||
21 | -----------------------------------------------------------------------------*/ |
|
21 | -----------------------------------------------------------------------------*/ | |
22 | #ifndef APB_FIFO_DRIVER_H |
|
22 | #ifndef APB_FIFO_DRIVER_H | |
23 | #define APB_FIFO_DRIVER_H |
|
23 | #define APB_FIFO_DRIVER_H | |
|
24 | ||||
|
25 | /*! \file apb_fifo_Driver.h | |||
|
26 | \brief LPP FIFO driver. | |||
24 |
|
|
27 | ||
|
28 | This library is written to work with LPP_APB_FIFO VHDL module from LPP's FreeVHDLIB. It represents a standard FIFO working, | |||
|
29 | used in many type of application. | |||
|
30 | ||||
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |||
|
32 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |||
|
33 | */ | |||
25 |
|
34 | |||
26 |
|
35 | |||
27 | /*=================================================== |
|
36 | /*=================================================== | |
28 | T Y P E S D E F |
|
37 | T Y P E S D E F | |
29 | ====================================================*/ |
|
38 | ====================================================*/ | |
30 |
|
39 | |||
31 | /** Structure reprοΏ½sentant le registre du FIFO */ |
|
40 | /*! \struct APB_FIFO_REG | |
|
41 | \brief Sturcture representing the fifo registers | |||
|
42 | */ | |||
32 | struct APB_FIFO_REG |
|
43 | struct APB_FIFO_REG | |
33 | { |
|
44 | { | |
34 | int rwdata; /**< Registre de configuration: Flag Ready [1] ; Flag Enable [0] */ |
|
45 | int rwdata; /**< \brief Data register Write/Read */ | |
35 | int raddr; /**< Registre de donnοΏ½e sur 16 bits */ |
|
46 | int raddr; /**< \brief Address register for the reading operation */ | |
36 | int cfgreg; |
|
47 | int cfgreg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] | |
37 | int dummy0; |
|
48 | Write enable Flag [HEX 1] | |
38 | int dummy1; |
|
49 | Empty Flag [HEX 2] | |
39 | int waddr; |
|
50 | Full Flag [HEX 3] | |
|
51 | Dummy "C" [HEX 4/5/6/7] */ | |||
|
52 | int dummy0; /**< \brief Unused register, aesthetic interest */ | |||
|
53 | int dummy1; /**< \brief Unused register, aesthetic interest */ | |||
|
54 | int waddr; /**< \brief Address register for the writing operation */ | |||
40 | }; |
|
55 | }; | |
41 |
|
56 | |||
42 | typedef struct APB_FIFO_REG APB_FIFO_Device; |
|
57 | typedef struct APB_FIFO_REG APB_FIFO_Device; | |
@@ -45,10 +60,17 typedef struct APB_FIFO_REG APB_FIFO_Dev | |||||
45 | F U N C T I O N S |
|
60 | F U N C T I O N S | |
46 | ====================================================*/ |
|
61 | ====================================================*/ | |
47 |
|
62 | |||
48 | /** Ouvre l'accοΏ½ au FIFO */ |
|
63 | /*! \fn APB_FIFO_Device* apbfifoOpen(int count); | |
|
64 | \brief Return count FIFO. | |||
|
65 | ||||
|
66 | This Function scans APB devices table and returns count FIFO. | |||
|
67 | ||||
|
68 | \param count The number of the FIFO you whant to get. For example if you have 3 FIFOS on your SOC you want | |||
|
69 | to use FIFO1 so count = 2. | |||
|
70 | \return The pointer to the device. | |||
|
71 | */ | |||
49 | APB_FIFO_Device* apbfifoOpen(int count); |
|
72 | APB_FIFO_Device* apbfifoOpen(int count); | |
50 |
|
73 | |||
51 |
|
74 | |||
52 |
|
75 | |||
53 |
|
||||
54 | #endif |
|
76 | #endif |
@@ -24,29 +24,36 | |||||
24 |
|
24 | |||
25 | /*! \file apb_uart_Driver.h |
|
25 | /*! \file apb_uart_Driver.h | |
26 | \brief LPP Uart driver. |
|
26 | \brief LPP Uart driver. | |
27 |
|
27 | |||
28 |
This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get |
|
28 | This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get, | |
29 | char or strings over uart. |
|
29 | char or strings over uart. | |
30 |
|
30 | |||
31 | \todo Continue documentation |
|
31 | \todo Check "DEVICE1 => count = 2" function Open | |
32 | \author Martin Morlot |
|
32 | \author Martin Morlot martin.morlot@lpp.polytechnique.fr | |
33 | */ |
|
33 | */ | |
34 |
|
34 | |||
35 |
|
35 | |||
36 |
|
36 | |||
37 | #define BaudGenOnDuty 0 |
|
37 | #define BaudGenOnDuty 0 /**< Used to reset the Baud Generator (Capture Flag) */ | |
38 | #define DataSended 0x10 |
|
38 | #define DataSended 0x10 /**< Used to know when the data was send */ | |
39 | #define NewData 0x100 |
|
39 | #define NewData 0x100 /**< Used to know if a New data is ready to be send */ | |
40 |
|
40 | |||
41 | /*=================================================== |
|
41 | /*=================================================== | |
42 | T Y P E S D E F |
|
42 | T Y P E S D E F | |
43 | ====================================================*/ |
|
43 | ====================================================*/ | |
44 |
|
44 | |||
|
45 | /*! \struct UART_Driver | |||
|
46 | \brief Sturcture representing the uart registers | |||
|
47 | */ | |||
45 | struct UART_Driver |
|
48 | struct UART_Driver | |
46 | { |
|
49 | { | |
47 | int ConfigReg; |
|
50 | int ConfigReg; /**< \brief Configuration register composed of Capture Flag [HEX 0] | |
48 | int DataWReg; |
|
51 | Sended Flag [HEX 1] | |
49 | int DataRReg; |
|
52 | NewData Flag [HEX 2] | |
|
53 | Dummy "E" [HEX 3/4] | |||
|
54 | BTrig Freq [HEX 5/6/7] */ | |||
|
55 | int DataWReg; /**< \brief Data Write register */ | |||
|
56 | int DataRReg; /**< \brief Data Read register */ | |||
50 | }; |
|
57 | }; | |
51 |
|
58 | |||
52 | typedef struct UART_Driver UART_Device; |
|
59 | typedef struct UART_Driver UART_Device; | |
@@ -57,11 +64,11 typedef struct UART_Driver UART_Device; | |||||
57 | ====================================================*/ |
|
64 | ====================================================*/ | |
58 |
|
65 | |||
59 | /*! \fn UART_Device* openUART(int count); |
|
66 | /*! \fn UART_Device* openUART(int count); | |
60 |
\brief Return count |
|
67 | \brief Return count UART. | |
61 |
|
68 | |||
62 |
This Function scans APB devices table and returns count |
|
69 | This Function scans APB devices table and returns count UART. | |
63 |
|
70 | |||
64 |
\param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you w |
|
71 | \param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you want | |
65 | to use UART1 so count = 2. |
|
72 | to use UART1 so count = 2. | |
66 | \return The pointer to the device. |
|
73 | \return The pointer to the device. | |
67 | */ |
|
74 | */ | |
@@ -69,9 +76,9 UART_Device* openUART(int count); | |||||
69 |
|
76 | |||
70 | /*! \fn void uartputc(UART_Device* dev,char c); |
|
77 | /*! \fn void uartputc(UART_Device* dev,char c); | |
71 | \brief Print char over given UART. |
|
78 | \brief Print char over given UART. | |
72 |
|
79 | |||
73 | This Function puts the given char over the given UART. |
|
80 | This Function puts the given char over the given UART. | |
74 |
|
81 | |||
75 | \param dev The UART pointer. |
|
82 | \param dev The UART pointer. | |
76 | \param c The char you whant to print. |
|
83 | \param c The char you whant to print. | |
77 | */ |
|
84 | */ | |
@@ -79,9 +86,9 void uartputc(UART_Device* dev,char c); | |||||
79 |
|
86 | |||
80 | /*! \fn void uartputs(UART_Device* dev,char* s); |
|
87 | /*! \fn void uartputs(UART_Device* dev,char* s); | |
81 | \brief Print string over given UART. |
|
88 | \brief Print string over given UART. | |
82 |
|
89 | |||
83 | This Function puts the given string over the given UART. |
|
90 | This Function puts the given string over the given UART. | |
84 |
|
91 | |||
85 | \param dev The UART pointer. |
|
92 | \param dev The UART pointer. | |
86 | \param s The string you whant to print. |
|
93 | \param s The string you whant to print. | |
87 | */ |
|
94 | */ | |
@@ -89,9 +96,9 void uartputs(UART_Device* dev,char* s); | |||||
89 |
|
96 | |||
90 | /*! \fn char uartgetc(UART_Device* dev); |
|
97 | /*! \fn char uartgetc(UART_Device* dev); | |
91 | \brief Get char from given UART. |
|
98 | \brief Get char from given UART. | |
92 |
|
99 | |||
93 | This Function get char from the given UART. |
|
100 | This Function get char from the given UART. | |
94 |
|
101 | |||
95 | \param dev The UART pointer. |
|
102 | \param dev The UART pointer. | |
96 | \return The read char. |
|
103 | \return The read char. | |
97 | */ |
|
104 | */ | |
@@ -99,9 +106,9 char uartgetc(UART_Device* dev); | |||||
99 |
|
106 | |||
100 | /*! \fn void uartgets(UART_Device* dev,char* s); |
|
107 | /*! \fn void uartgets(UART_Device* dev,char* s); | |
101 | \brief Get string from given UART. |
|
108 | \brief Get string from given UART. | |
102 |
|
109 | |||
103 | This Function get string from the given UART. |
|
110 | This Function get string from the given UART. | |
104 |
|
111 | |||
105 | \param dev The UART pointer. |
|
112 | \param dev The UART pointer. | |
106 | \param s The read string. |
|
113 | \param s The read string. | |
107 | */ |
|
114 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now