Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Fork of X_NUCLEO_IHM03A1 by
Components/Interfaces/Component_class.h@2:06f3a5360a45, 2016-04-13 (annotated)
- Committer:
- nucleosam
- Date:
- Wed Apr 13 12:55:45 2016 +0000
- Revision:
- 2:06f3a5360a45
- Parent:
- 1:8ce2a5d6fbf8
To avoid a confusion, renamed Tval_Current_to_RegVal to Tval_RefVoltage_to_RegVal and Tval_RegVal_to_Current to Tval_RegVal_to_RefVoltage.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nucleosam | 0:00a3c3f5a8f0 | 1 | /** |
nucleosam | 0:00a3c3f5a8f0 | 2 | ****************************************************************************** |
nucleosam | 0:00a3c3f5a8f0 | 3 | * @file Component_class.h |
nucleosam | 0:00a3c3f5a8f0 | 4 | * @author AST |
nucleosam | 0:00a3c3f5a8f0 | 5 | * @version V1.0.0 |
nucleosam | 0:00a3c3f5a8f0 | 6 | * @date April 13th, 2015 |
nucleosam | 0:00a3c3f5a8f0 | 7 | * @brief This file contains the abstract class describing the interface of a |
nucleosam | 0:00a3c3f5a8f0 | 8 | * generic component. |
nucleosam | 0:00a3c3f5a8f0 | 9 | ****************************************************************************** |
nucleosam | 0:00a3c3f5a8f0 | 10 | * @attention |
nucleosam | 0:00a3c3f5a8f0 | 11 | * |
nucleosam | 0:00a3c3f5a8f0 | 12 | * <h2><center>© COPYRIGHT(c) 2015 STMicroelectronics</center></h2> |
nucleosam | 0:00a3c3f5a8f0 | 13 | * |
nucleosam | 0:00a3c3f5a8f0 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
nucleosam | 0:00a3c3f5a8f0 | 15 | * are permitted provided that the following conditions are met: |
nucleosam | 0:00a3c3f5a8f0 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
nucleosam | 0:00a3c3f5a8f0 | 17 | * this list of conditions and the following disclaimer. |
nucleosam | 0:00a3c3f5a8f0 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
nucleosam | 0:00a3c3f5a8f0 | 19 | * this list of conditions and the following disclaimer in the documentation |
nucleosam | 0:00a3c3f5a8f0 | 20 | * and/or other materials provided with the distribution. |
nucleosam | 0:00a3c3f5a8f0 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
nucleosam | 0:00a3c3f5a8f0 | 22 | * may be used to endorse or promote products derived from this software |
nucleosam | 0:00a3c3f5a8f0 | 23 | * without specific prior written permission. |
nucleosam | 0:00a3c3f5a8f0 | 24 | * |
nucleosam | 0:00a3c3f5a8f0 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
nucleosam | 0:00a3c3f5a8f0 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
nucleosam | 0:00a3c3f5a8f0 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
nucleosam | 0:00a3c3f5a8f0 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
nucleosam | 0:00a3c3f5a8f0 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
nucleosam | 0:00a3c3f5a8f0 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
nucleosam | 0:00a3c3f5a8f0 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
nucleosam | 0:00a3c3f5a8f0 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
nucleosam | 0:00a3c3f5a8f0 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
nucleosam | 0:00a3c3f5a8f0 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
nucleosam | 0:00a3c3f5a8f0 | 35 | * |
nucleosam | 0:00a3c3f5a8f0 | 36 | ****************************************************************************** |
nucleosam | 0:00a3c3f5a8f0 | 37 | */ |
nucleosam | 0:00a3c3f5a8f0 | 38 | |
nucleosam | 0:00a3c3f5a8f0 | 39 | |
nucleosam | 0:00a3c3f5a8f0 | 40 | /* Define to prevent recursive inclusion -------------------------------------*/ |
nucleosam | 0:00a3c3f5a8f0 | 41 | |
nucleosam | 0:00a3c3f5a8f0 | 42 | #ifndef __COMPONENT_CLASS_H |
nucleosam | 0:00a3c3f5a8f0 | 43 | #define __COMPONENT_CLASS_H |
nucleosam | 0:00a3c3f5a8f0 | 44 | |
nucleosam | 0:00a3c3f5a8f0 | 45 | |
nucleosam | 0:00a3c3f5a8f0 | 46 | /* Includes ------------------------------------------------------------------*/ |
nucleosam | 0:00a3c3f5a8f0 | 47 | |
nucleosam | 0:00a3c3f5a8f0 | 48 | #include <stdint.h> |
nucleosam | 0:00a3c3f5a8f0 | 49 | |
nucleosam | 0:00a3c3f5a8f0 | 50 | |
nucleosam | 0:00a3c3f5a8f0 | 51 | /* Classes ------------------------------------------------------------------*/ |
nucleosam | 0:00a3c3f5a8f0 | 52 | |
nucleosam | 0:00a3c3f5a8f0 | 53 | /** An abstract class for Generic components. |
nucleosam | 0:00a3c3f5a8f0 | 54 | */ |
nucleosam | 0:00a3c3f5a8f0 | 55 | class Component |
nucleosam | 0:00a3c3f5a8f0 | 56 | { |
nucleosam | 0:00a3c3f5a8f0 | 57 | public: |
nucleosam | 0:00a3c3f5a8f0 | 58 | /** |
nucleosam | 0:00a3c3f5a8f0 | 59 | * @brief Initializing the component. |
nucleosam | 0:00a3c3f5a8f0 | 60 | * @param[in] init pointer to device specific initalization structure. |
nucleosam | 0:00a3c3f5a8f0 | 61 | * @retval "0" in case of success, an error code otherwise. |
nucleosam | 0:00a3c3f5a8f0 | 62 | */ |
nucleosam | 0:00a3c3f5a8f0 | 63 | virtual int Init(void *init) = 0; |
nucleosam | 0:00a3c3f5a8f0 | 64 | |
nucleosam | 0:00a3c3f5a8f0 | 65 | /** |
nucleosam | 0:00a3c3f5a8f0 | 66 | * @brief Getting the ID of the component. |
nucleosam | 0:00a3c3f5a8f0 | 67 | * @param[out] id pointer to an allocated variable to store the ID into. |
nucleosam | 0:00a3c3f5a8f0 | 68 | * @retval "0" in case of success, an error code otherwise. |
nucleosam | 0:00a3c3f5a8f0 | 69 | */ |
nucleosam | 0:00a3c3f5a8f0 | 70 | virtual int ReadID(uint8_t *id) = 0; |
nucleosam | 0:00a3c3f5a8f0 | 71 | }; |
nucleosam | 0:00a3c3f5a8f0 | 72 | |
nucleosam | 0:00a3c3f5a8f0 | 73 | #endif /* __COMPONENT_CLASS_H */ |
nucleosam | 0:00a3c3f5a8f0 | 74 | |
nucleosam | 0:00a3c3f5a8f0 | 75 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |