Platform drivers for Mbed.
Dependents: EVAL-CN0535-FMCZ EVAL-CN0535-FMCZ EVAL-AD568x-AD569x EVAL-AD7606 ... more
gpio_extra.h
00001 /***************************************************************************//** 00002 * @file gpio_extra.h 00003 * @brief: Header containing extra types required for GPIO interface 00004 ******************************************************************************** 00005 * Copyright (c) 2021 Analog Devices, Inc. 00006 * All rights reserved. 00007 * 00008 * This software is proprietary to Analog Devices, Inc. and its licensors. 00009 * By using this software you agree to the terms of the associated 00010 * Analog Devices Software License Agreement. 00011 *******************************************************************************/ 00012 00013 #ifndef GPIO_EXTRA_H 00014 #define GPIO_EXTRA_H 00015 00016 // Platform support needs to be C-compatible to work with other drivers 00017 #ifdef __cplusplus 00018 extern "C" 00019 { 00020 #endif 00021 00022 /******************************************************************************/ 00023 /***************************** Include Files **********************************/ 00024 /******************************************************************************/ 00025 #include <stdio.h> 00026 00027 /******************************************************************************/ 00028 /********************** Macros and Constants Definitions **********************/ 00029 /******************************************************************************/ 00030 00031 /******************************************************************************/ 00032 /********************** Variables and User defined data types *****************/ 00033 /******************************************************************************/ 00034 00035 /* 00036 * Note: The structure members are not strongly typed, as this file is included 00037 * in application specific '.c' files. The mbed code structure does not 00038 * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files. 00039 * All the members are hence typecasted to mbed specific type during 00040 * gpio init and read/write operations. 00041 **/ 00042 00043 /** 00044 * @struct mbed_gpio_init_param 00045 * @brief Structure holding the GPIO init parameters for mbed platform. 00046 */ 00047 typedef struct mbed_gpio_init_param { 00048 uint8_t pin_mode; // GPIO pin mode (PinMode) 00049 } mbed_gpio_init_param; 00050 00051 /** 00052 * @struct mbed_gpio_desc 00053 * @brief GPIO specific descriptor for the mbed platform. 00054 */ 00055 typedef struct mbed_gpio_desc { 00056 uint8_t direction; 00057 void *gpio_pin; // GPIO pin instance (DigitalIn/DigitalOut) 00058 uint8_t pin_mode; 00059 } mbed_gpio_desc; 00060 00061 00062 /******************************************************************************/ 00063 /************************ Functions Declarations ******************************/ 00064 /******************************************************************************/ 00065 00066 00067 #ifdef __cplusplus // Closing extern c 00068 } 00069 #endif 00070 00071 #endif /* GPIO_EXTRA_H */
Generated on Wed Jul 13 2022 14:37:51 by 1.7.2