Example program for EVAL-ADMX2001
Dependencies: ADMX2001
platform_drivers/src/gpio_extra.h@15:fca7551aaf0a, 2021-11-17 (annotated)
- Committer:
- nsheth
- Date:
- Wed Nov 17 18:15:37 2021 +0000
- Revision:
- 15:fca7551aaf0a
- Parent:
- 9:29db35656fcb
Updating default .lib file for eval platform
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nsheth | 9:29db35656fcb | 1 | /***************************************************************************//** |
nsheth | 9:29db35656fcb | 2 | * @file gpio_extra.h |
nsheth | 9:29db35656fcb | 3 | * @brief: Header containing extra types required for GPIO interface |
nsheth | 9:29db35656fcb | 4 | ******************************************************************************** |
nsheth | 9:29db35656fcb | 5 | * Copyright (c) 2020 Analog Devices, Inc. |
nsheth | 9:29db35656fcb | 6 | * |
nsheth | 9:29db35656fcb | 7 | * All rights reserved. |
nsheth | 9:29db35656fcb | 8 | * |
nsheth | 9:29db35656fcb | 9 | * This software is proprietary to Analog Devices, Inc. and its licensors. |
nsheth | 9:29db35656fcb | 10 | * By using this software you agree to the terms of the associated |
nsheth | 9:29db35656fcb | 11 | * Analog Devices Software License Agreement. |
nsheth | 9:29db35656fcb | 12 | *******************************************************************************/ |
nsheth | 9:29db35656fcb | 13 | |
nsheth | 9:29db35656fcb | 14 | #ifndef GPIO_EXTRA_H |
nsheth | 9:29db35656fcb | 15 | #define GPIO_EXTRA_H |
nsheth | 9:29db35656fcb | 16 | |
nsheth | 9:29db35656fcb | 17 | |
nsheth | 9:29db35656fcb | 18 | // Platform support needs to be C-compatible to work with other drivers |
nsheth | 9:29db35656fcb | 19 | #ifdef __cplusplus |
nsheth | 9:29db35656fcb | 20 | extern "C" |
nsheth | 9:29db35656fcb | 21 | { |
nsheth | 9:29db35656fcb | 22 | #endif |
nsheth | 9:29db35656fcb | 23 | |
nsheth | 9:29db35656fcb | 24 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 25 | /***************************** Include Files **********************************/ |
nsheth | 9:29db35656fcb | 26 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 27 | #include <stdio.h> |
nsheth | 9:29db35656fcb | 28 | |
nsheth | 9:29db35656fcb | 29 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 30 | /********************** Macros and Constants Definitions **********************/ |
nsheth | 9:29db35656fcb | 31 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 32 | |
nsheth | 9:29db35656fcb | 33 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 34 | /********************** Variables and User defined data types *****************/ |
nsheth | 9:29db35656fcb | 35 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 36 | |
nsheth | 9:29db35656fcb | 37 | /* |
nsheth | 9:29db35656fcb | 38 | * Note: The structure members are not strongly typed, as this file is included |
nsheth | 9:29db35656fcb | 39 | * in application specific '.c' files. The mbed code structure does not |
nsheth | 9:29db35656fcb | 40 | * allow inclusion of mbed driver files (e.g. mbed.h) into '.c' files. |
nsheth | 9:29db35656fcb | 41 | * All the members are hence typecasted to mbed specific type during |
nsheth | 9:29db35656fcb | 42 | * gpio init and read/write operations. |
nsheth | 9:29db35656fcb | 43 | **/ |
nsheth | 9:29db35656fcb | 44 | |
nsheth | 9:29db35656fcb | 45 | /** |
nsheth | 9:29db35656fcb | 46 | * @struct mbed_gpio_init_param |
nsheth | 9:29db35656fcb | 47 | * @brief Structure holding the GPIO init parameters for mbed platform. |
nsheth | 9:29db35656fcb | 48 | */ |
nsheth | 9:29db35656fcb | 49 | typedef struct mbed_gpio_init_param { |
nsheth | 9:29db35656fcb | 50 | uint8_t pin_mode; // GPIO pin mode (PinMode) |
nsheth | 9:29db35656fcb | 51 | } mbed_gpio_init_param; |
nsheth | 9:29db35656fcb | 52 | |
nsheth | 9:29db35656fcb | 53 | /** |
nsheth | 9:29db35656fcb | 54 | * @struct mbed_gpio_desc |
nsheth | 9:29db35656fcb | 55 | * @brief GPIO specific descriptor for the mbed platform. |
nsheth | 9:29db35656fcb | 56 | */ |
nsheth | 9:29db35656fcb | 57 | typedef struct mbed_gpio_desc { |
nsheth | 9:29db35656fcb | 58 | void *gpio_pin; // GPIO pin instance (DigitalIn/DigitalOut) |
nsheth | 9:29db35656fcb | 59 | } mbed_gpio_desc; |
nsheth | 9:29db35656fcb | 60 | |
nsheth | 9:29db35656fcb | 61 | |
nsheth | 9:29db35656fcb | 62 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 63 | /************************ Functions Declarations ******************************/ |
nsheth | 9:29db35656fcb | 64 | /******************************************************************************/ |
nsheth | 9:29db35656fcb | 65 | |
nsheth | 9:29db35656fcb | 66 | |
nsheth | 9:29db35656fcb | 67 | #ifdef __cplusplus // Closing extern c |
nsheth | 9:29db35656fcb | 68 | } |
nsheth | 9:29db35656fcb | 69 | #endif |
nsheth | 9:29db35656fcb | 70 | |
nsheth | 9:29db35656fcb | 71 | #endif /* GPIO_EXTRA_H */ |