mbed library for STMicroelectronics' X-NUCLEO-IKA01A1 expansion board.

Dependents:   HelloWorld_IKA01A1

Fork of X_NUCLEO_IKA01A1 by ST Expansion SW Team

Library for STMicroelectronics' X-NUCLEO-IKA01A1 multifunctional expansion board based on operational amplifiers.

Committer:
hemddabral
Date:
Wed Mar 02 12:58:02 2016 +0000
Revision:
2:19d1dcef0c0e
First draft version using STM32COO utility

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hemddabral 2:19d1dcef0c0e 1 /**
hemddabral 2:19d1dcef0c0e 2 ******************************************************************************
hemddabral 2:19d1dcef0c0e 3 * @file instrumentation_amp.h
hemddabral 2:19d1dcef0c0e 4 * @author Central Labs
hemddabral 2:19d1dcef0c0e 5 * @version 1.0.0
hemddabral 2:19d1dcef0c0e 6 * @date 11-February-2016
hemddabral 2:19d1dcef0c0e 7 * @brief Portable architecture for TSZ124
hemddabral 2:19d1dcef0c0e 8 ******************************************************************************
hemddabral 2:19d1dcef0c0e 9 * @attention
hemddabral 2:19d1dcef0c0e 10 *
hemddabral 2:19d1dcef0c0e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
hemddabral 2:19d1dcef0c0e 12 *
hemddabral 2:19d1dcef0c0e 13 * Redistribution and use in source and binary forms, with or without modification,
hemddabral 2:19d1dcef0c0e 14 * are permitted provided that the following conditions are met:
hemddabral 2:19d1dcef0c0e 15 * 1. Redistributions of source code must retain the above copyright notice,
hemddabral 2:19d1dcef0c0e 16 * this list of conditions and the following disclaimer.
hemddabral 2:19d1dcef0c0e 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
hemddabral 2:19d1dcef0c0e 18 * this list of conditions and the following disclaimer in the documentation
hemddabral 2:19d1dcef0c0e 19 * and/or other materials provided with the distribution.
hemddabral 2:19d1dcef0c0e 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
hemddabral 2:19d1dcef0c0e 21 * may be used to endorse or promote products derived from this software
hemddabral 2:19d1dcef0c0e 22 * without specific prior written permission.
hemddabral 2:19d1dcef0c0e 23 *
hemddabral 2:19d1dcef0c0e 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
hemddabral 2:19d1dcef0c0e 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
hemddabral 2:19d1dcef0c0e 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
hemddabral 2:19d1dcef0c0e 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
hemddabral 2:19d1dcef0c0e 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
hemddabral 2:19d1dcef0c0e 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
hemddabral 2:19d1dcef0c0e 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
hemddabral 2:19d1dcef0c0e 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
hemddabral 2:19d1dcef0c0e 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
hemddabral 2:19d1dcef0c0e 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
hemddabral 2:19d1dcef0c0e 34 *
hemddabral 2:19d1dcef0c0e 35 ******************************************************************************
hemddabral 2:19d1dcef0c0e 36 */
hemddabral 2:19d1dcef0c0e 37
hemddabral 2:19d1dcef0c0e 38
hemddabral 2:19d1dcef0c0e 39 /* Define to prevent recursive inclusion -------------------------------------*/
hemddabral 2:19d1dcef0c0e 40
hemddabral 2:19d1dcef0c0e 41 #ifndef __INSTRUMENTATION_AMP_H
hemddabral 2:19d1dcef0c0e 42 #define __INSTRUMENTATION_AMP_H
hemddabral 2:19d1dcef0c0e 43
hemddabral 2:19d1dcef0c0e 44 #ifdef __cplusplus
hemddabral 2:19d1dcef0c0e 45 extern "C" {
hemddabral 2:19d1dcef0c0e 46 #endif
hemddabral 2:19d1dcef0c0e 47
hemddabral 2:19d1dcef0c0e 48
hemddabral 2:19d1dcef0c0e 49 /* Includes ------------------------------------------------------------------*/
hemddabral 2:19d1dcef0c0e 50
hemddabral 2:19d1dcef0c0e 51 #include <stdint.h>
hemddabral 2:19d1dcef0c0e 52 #include "component.h"
hemddabral 2:19d1dcef0c0e 53
hemddabral 2:19d1dcef0c0e 54
hemddabral 2:19d1dcef0c0e 55 /* Types ---------------------------------------------------------------------*/
hemddabral 2:19d1dcef0c0e 56
hemddabral 2:19d1dcef0c0e 57 /** @addtogroup BSP
hemddabral 2:19d1dcef0c0e 58 * @{
hemddabral 2:19d1dcef0c0e 59 */
hemddabral 2:19d1dcef0c0e 60
hemddabral 2:19d1dcef0c0e 61 /** @addtogroup Components
hemddabral 2:19d1dcef0c0e 62 * @{
hemddabral 2:19d1dcef0c0e 63 */
hemddabral 2:19d1dcef0c0e 64
hemddabral 2:19d1dcef0c0e 65 /** @addtogroup INSTRUMENTATION_AMP
hemddabral 2:19d1dcef0c0e 66 * @{
hemddabral 2:19d1dcef0c0e 67 */
hemddabral 2:19d1dcef0c0e 68
hemddabral 2:19d1dcef0c0e 69 /** @defgroup INSTRUMENTATION_AMP_Exported_Types
hemddabral 2:19d1dcef0c0e 70 * @{
hemddabral 2:19d1dcef0c0e 71 */
hemddabral 2:19d1dcef0c0e 72
hemddabral 2:19d1dcef0c0e 73 /**
hemddabral 2:19d1dcef0c0e 74 * @brief INSTRUMENTATION_AMP component identifier enumerator definition.
hemddabral 2:19d1dcef0c0e 75 */
hemddabral 2:19d1dcef0c0e 76 typedef enum
hemddabral 2:19d1dcef0c0e 77 {
hemddabral 2:19d1dcef0c0e 78 INSTRUMENTATION_AMP_NONE_COMPONENT = 0,
hemddabral 2:19d1dcef0c0e 79 INSTRUMENTATION_AMP_TSZ124_COMPONENT = 1
hemddabral 2:19d1dcef0c0e 80 } INSTRUMENTATION_AMP_Component_t;
hemddabral 2:19d1dcef0c0e 81
hemddabral 2:19d1dcef0c0e 82 /**
hemddabral 2:19d1dcef0c0e 83 * @brief INSTRUMENTATION_AMP driver virtual table structure definition.
hemddabral 2:19d1dcef0c0e 84 */
hemddabral 2:19d1dcef0c0e 85 typedef struct
hemddabral 2:19d1dcef0c0e 86 {
hemddabral 2:19d1dcef0c0e 87 /* ACTION ----------------------------------------------------------------*
hemddabral 2:19d1dcef0c0e 88 * Declare here the component's generic functions. *
hemddabral 2:19d1dcef0c0e 89 * Tag this group of functions with the " Generic " C-style comment. *
hemddabral 2:19d1dcef0c0e 90 * A component's interface has to define at least the two generic *
hemddabral 2:19d1dcef0c0e 91 * functions provided here below within the "Example" section, as the *
hemddabral 2:19d1dcef0c0e 92 * first and second functions of its Virtual Table. They have to be *
hemddabral 2:19d1dcef0c0e 93 * specified exactly in the given way. *
hemddabral 2:19d1dcef0c0e 94 * *
hemddabral 2:19d1dcef0c0e 95 * Example: *
hemddabral 2:19d1dcef0c0e 96 * Status_t (*Init) (void *handle, void *init); *
hemddabral 2:19d1dcef0c0e 97 * Status_t (*ReadID) (void *handle, uint8_t *id); *
hemddabral 2:19d1dcef0c0e 98 *------------------------------------------------------------------------*/
hemddabral 2:19d1dcef0c0e 99 /* Generic */
hemddabral 2:19d1dcef0c0e 100 Status_t (*Init) (void *handle, void *init);
hemddabral 2:19d1dcef0c0e 101 Status_t (*ReadID) (void *handle, uint8_t *id);
hemddabral 2:19d1dcef0c0e 102
hemddabral 2:19d1dcef0c0e 103 /* ACTION ----------------------------------------------------------------*
hemddabral 2:19d1dcef0c0e 104 * Declare here the component's specific functions. *
hemddabral 2:19d1dcef0c0e 105 * Tag this group of functions with the " Specific " C-style comment. *
hemddabral 2:19d1dcef0c0e 106 * Do not specify any function if not required. *
hemddabral 2:19d1dcef0c0e 107 * *
hemddabral 2:19d1dcef0c0e 108 * Example: *
hemddabral 2:19d1dcef0c0e 109 * Status_t (*GetValue) (void *handle, float *f); *
hemddabral 2:19d1dcef0c0e 110 *------------------------------------------------------------------------*/
hemddabral 2:19d1dcef0c0e 111 /* Specific */
hemddabral 2:19d1dcef0c0e 112 unsigned int (*GetVoltage) (void *handle);
hemddabral 2:19d1dcef0c0e 113 unsigned int (*GetCurrent) (void *handle);
hemddabral 2:19d1dcef0c0e 114 } INSTRUMENTATION_AMP_VTable_t;
hemddabral 2:19d1dcef0c0e 115
hemddabral 2:19d1dcef0c0e 116 #ifdef __cplusplus
hemddabral 2:19d1dcef0c0e 117 }
hemddabral 2:19d1dcef0c0e 118 #endif
hemddabral 2:19d1dcef0c0e 119
hemddabral 2:19d1dcef0c0e 120 #endif /* __INSTRUMENTATION_AMP_H */
hemddabral 2:19d1dcef0c0e 121
hemddabral 2:19d1dcef0c0e 122 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
hemddabral 2:19d1dcef0c0e 123