diff --git a/LPP_drivers/libsrc/FFT/apb_fft_Driver.h b/LPP_drivers/libsrc/FFT/apb_fft_Driver.h --- a/LPP_drivers/libsrc/FFT/apb_fft_Driver.h +++ b/LPP_drivers/libsrc/FFT/apb_fft_Driver.h @@ -22,22 +22,38 @@ #ifndef APB_FFT_DRIVER_H #define APB_FFT_DRIVER_H -#define FFT_Empty 0x00100 -#define FFT_Full 0x01000 +/*! \file apb_fft_Driver.h + \brief LPP FFT driver. + + This library is written to work with LPP_APB_FFT VHDL module from LPP's FreeVHDLIB. It calculate a fast fourier transforms, + from an input data table. + + \todo Check "DEVICE1 => count = 2" function Open + \author Martin Morlot martin.morlot@lpp.polytechnique.fr +*/ + +#define FFT_Empty 0x00100 /**< Used to know when the data can be send to the FFT module */ +#define FFT_Full 0x01000 /**< Used to know when the data can be send to the FFT module */ /*=================================================== T Y P E S D E F ====================================================*/ - +/*! \struct FFT_Driver + \brief Sturcture representing the fft registers +*/ struct FFT_Driver { - int RWDataReg; - int ReadAddrReg; - int ConfigReg; - int Dummy1; - int Dummy0; - int WriteAddrReg; + int RWDataReg; /**< \brief Data register Write/Read */ + int ReadAddrReg; /**< \brief Address register for the reading operation */ + int ConfigReg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] + Write enable Flag [HEX 1] + Empty Flag [HEX 2] + Full Flag [HEX 3] + Dummy "C" [HEX 4/5/6/7] */ + int Dummy1; /**< \brief Unused register, aesthetic interest */ + int Dummy0; /**< \brief Unused register, aesthetic interest */ + int WriteAddrReg; /**< \brief Address register for the writing operation */ }; typedef struct FFT_Driver FFT_Device; @@ -46,10 +62,36 @@ typedef struct FFT_Driver FFT_Device; /*=================================================== F U N C T I O N S ====================================================*/ - +/*! \fn FFT_Device* openFFT(int count); + \brief Return count FFT. + + This Function scans APB devices table and returns count FFT. + + \param count The number of the FFT you whant to get. For example if you have 3 FFTS on your SOC you want + to use FFT1 so count = 2. + \return The pointer to the device. +*/ FFT_Device* openFFT(int count); -int FftInput(int Tbl[],FFT_Device*); -int FftOutput(int Tbl[],FFT_Device*); + +/*! \fn int FftInput(int Tbl[],FFT_Device*); + \brief Fill in the Input for the FFT + + This function provides the data used by the FFT + + \param Tbl[] The Table which contains the Data. + \param dev The FFT pointer. +*/ +int FftInput(int Tbl[],FFT_Device* dev); + +/*! \fn int FftOutput(int Tbl[],FFT_Device*); + \brief Save data from the FFT + + This function save the data generated by the FFT + + \param Tbl[] The Table which will contains the Data. + \param dev The FFT pointer. +*/ +int FftOutput(int Tbl[],FFT_Device* dev); diff --git a/LPP_drivers/libsrc/FIFO/apb_fifo_Driver.h b/LPP_drivers/libsrc/FIFO/apb_fifo_Driver.h --- a/LPP_drivers/libsrc/FIFO/apb_fifo_Driver.h +++ b/LPP_drivers/libsrc/FIFO/apb_fifo_Driver.h @@ -21,22 +21,37 @@ -----------------------------------------------------------------------------*/ #ifndef APB_FIFO_DRIVER_H #define APB_FIFO_DRIVER_H + +/*! \file apb_fifo_Driver.h + \brief LPP FIFO driver. + This library is written to work with LPP_APB_FIFO VHDL module from LPP's FreeVHDLIB. It represents a standard FIFO working, + used in many type of application. + + \todo Check "DEVICE1 => count = 2" function Open + \author Martin Morlot martin.morlot@lpp.polytechnique.fr +*/ /*=================================================== T Y P E S D E F ====================================================*/ -/** Structure représentant le registre du FIFO */ +/*! \struct APB_FIFO_REG + \brief Sturcture representing the fifo registers +*/ struct APB_FIFO_REG { - int rwdata; /**< Registre de configuration: Flag Ready [1] ; Flag Enable [0] */ - int raddr; /**< Registre de donnée sur 16 bits */ - int cfgreg; - int dummy0; - int dummy1; - int waddr; + int rwdata; /**< \brief Data register Write/Read */ + int raddr; /**< \brief Address register for the reading operation */ + int cfgreg; /**< \brief Configuration register composed of Read enable Flag [HEX 0] + Write enable Flag [HEX 1] + Empty Flag [HEX 2] + Full Flag [HEX 3] + Dummy "C" [HEX 4/5/6/7] */ + int dummy0; /**< \brief Unused register, aesthetic interest */ + int dummy1; /**< \brief Unused register, aesthetic interest */ + int waddr; /**< \brief Address register for the writing operation */ }; typedef struct APB_FIFO_REG APB_FIFO_Device; @@ -45,10 +60,17 @@ typedef struct APB_FIFO_REG APB_FIFO_Dev F U N C T I O N S ====================================================*/ -/** Ouvre l'accé au FIFO */ +/*! \fn APB_FIFO_Device* apbfifoOpen(int count); + \brief Return count FIFO. + + This Function scans APB devices table and returns count FIFO. + + \param count The number of the FIFO you whant to get. For example if you have 3 FIFOS on your SOC you want + to use FIFO1 so count = 2. + \return The pointer to the device. +*/ APB_FIFO_Device* apbfifoOpen(int count); - #endif diff --git a/LPP_drivers/libsrc/UART/apb_uart_Driver.h b/LPP_drivers/libsrc/UART/apb_uart_Driver.h --- a/LPP_drivers/libsrc/UART/apb_uart_Driver.h +++ b/LPP_drivers/libsrc/UART/apb_uart_Driver.h @@ -24,29 +24,36 @@ /*! \file apb_uart_Driver.h \brief LPP Uart driver. - - This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get + + This library is written to work with LPP_APB_UART VHDL module from LPP's FreeVHDLIB. It help you to print and get, char or strings over uart. - - \todo Continue documentation - \author Martin Morlot + + \todo Check "DEVICE1 => count = 2" function Open + \author Martin Morlot martin.morlot@lpp.polytechnique.fr */ -#define BaudGenOnDuty 0 -#define DataSended 0x10 -#define NewData 0x100 +#define BaudGenOnDuty 0 /**< Used to reset the Baud Generator (Capture Flag) */ +#define DataSended 0x10 /**< Used to know when the data was send */ +#define NewData 0x100 /**< Used to know if a New data is ready to be send */ /*=================================================== T Y P E S D E F ====================================================*/ - + +/*! \struct UART_Driver + \brief Sturcture representing the uart registers +*/ struct UART_Driver { - int ConfigReg; - int DataWReg; - int DataRReg; + int ConfigReg; /**< \brief Configuration register composed of Capture Flag [HEX 0] + Sended Flag [HEX 1] + NewData Flag [HEX 2] + Dummy "E" [HEX 3/4] + BTrig Freq [HEX 5/6/7] */ + int DataWReg; /**< \brief Data Write register */ + int DataRReg; /**< \brief Data Read register */ }; typedef struct UART_Driver UART_Device; @@ -57,11 +64,11 @@ typedef struct UART_Driver UART_Device; ====================================================*/ /*! \fn UART_Device* openUART(int count); - \brief Return counth UART. - - This Function scans APB devices table and returns counth UART. - - \param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you whant + \brief Return count UART. + + This Function scans APB devices table and returns count UART. + + \param count The number of the UART you whant to get. For example if you have 3 UARTS on your SOC you want to use UART1 so count = 2. \return The pointer to the device. */ @@ -69,9 +76,9 @@ UART_Device* openUART(int count); /*! \fn void uartputc(UART_Device* dev,char c); \brief Print char over given UART. - + This Function puts the given char over the given UART. - + \param dev The UART pointer. \param c The char you whant to print. */ @@ -79,9 +86,9 @@ void uartputc(UART_Device* dev,char c); /*! \fn void uartputs(UART_Device* dev,char* s); \brief Print string over given UART. - + This Function puts the given string over the given UART. - + \param dev The UART pointer. \param s The string you whant to print. */ @@ -89,9 +96,9 @@ void uartputs(UART_Device* dev,char* s); /*! \fn char uartgetc(UART_Device* dev); \brief Get char from given UART. - + This Function get char from the given UART. - + \param dev The UART pointer. \return The read char. */ @@ -99,9 +106,9 @@ char uartgetc(UART_Device* dev); /*! \fn void uartgets(UART_Device* dev,char* s); \brief Get string from given UART. - + This Function get string from the given UART. - + \param dev The UART pointer. \param s The read string. */