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