Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/mbed/hal/gpio_api.h

    r321 r429  
     1
     2/** \addtogroup hal */
     3/** @{*/
    14/* mbed Microcontroller Library
    25 * Copyright (c) 2006-2013 ARM Limited
     
    1720#define MBED_GPIO_API_H
    1821
     22#include <stdint.h>
    1923#include "device.h"
    2024
     
    2327#endif
    2428
    25 /* Set the given pin as GPIO
     29/**
     30 * \defgroup hal_gpio GPIO HAL functions
     31 * @{
     32 */
     33
     34/** Set the given pin as GPIO
     35 *
    2636 * @param pin The pin to be set as GPIO
    2737 * @return The GPIO port mask for this pin
    2838 **/
    2939uint32_t gpio_set(PinName pin);
    30 
    3140/* Checks if gpio object is connected (pin was not initialized with NC)
    3241 * @param pin The pin to be set as GPIO
     
    3544int gpio_is_connected(const gpio_t *obj);
    3645
    37 /* GPIO object */
     46/** Initialize the GPIO pin
     47 *
     48 * @param obj The GPIO object to initialize
     49 * @param pin The GPIO pin to initialize
     50 */
    3851void gpio_init(gpio_t *obj, PinName pin);
    3952
    40 void gpio_mode (gpio_t *obj, PinMode mode);
    41 void gpio_dir  (gpio_t *obj, PinDirection direction);
     53/** Set the input pin mode
     54 *
     55 * @param obj  The GPIO object
     56 * @param mode The pin mode to be set
     57 */
     58void gpio_mode(gpio_t *obj, PinMode mode);
    4259
     60/** Set the pin direction
     61 *
     62 * @param obj       The GPIO object
     63 * @param direction The pin direction to be set
     64 */
     65void gpio_dir(gpio_t *obj, PinDirection direction);
     66
     67/** Set the output value
     68 *
     69 * @param obj   The GPIO object
     70 * @param value The value to be set
     71 */
    4372void gpio_write(gpio_t *obj, int value);
    44 int  gpio_read (gpio_t *obj);
    4573
    46 // the following set of functions are generic and are implemented in the common gpio.c file
     74/** Read the input value
     75 *
     76 * @param obj The GPIO object
     77 * @return An integer value 1 or 0
     78 */
     79int gpio_read(gpio_t *obj);
     80
     81// the following functions are generic and implemented in the common gpio.c file
     82// TODO: fix, will be moved to the common gpio header file
     83
     84/** Init the input pin and set mode to PullDefault
     85 *
     86 * @param gpio The GPIO object
     87 * @param pin The pin name
     88 */
    4789void gpio_init_in(gpio_t* gpio, PinName pin);
     90
     91/** Init the input pin and set the mode
     92 *
     93 * @param gpio  The GPIO object
     94 * @param pin  The pin name
     95 * @param mode The pin mode to be set
     96 */
    4897void gpio_init_in_ex(gpio_t* gpio, PinName pin, PinMode mode);
     98
     99/** Init the output pin as an output, with predefined output value 0
     100 *
     101 * @param gpio The GPIO object
     102 * @param pin The pin name
     103 * @return An integer value 1 or 0
     104 */
    49105void gpio_init_out(gpio_t* gpio, PinName pin);
     106
     107/** Init the pin as an output and set the output value
     108 *
     109 * @param gpio  The GPIO object
     110 * @param pin   The pin name
     111 * @param value The value to be set
     112 */
    50113void gpio_init_out_ex(gpio_t* gpio, PinName pin, int value);
     114
     115/** Init the pin to be in/out
     116 *
     117 * @param gpio      The GPIO object
     118 * @param pin       The pin name
     119 * @param direction The pin direction to be set
     120 * @param mode      The pin mode to be set
     121 * @param value     The value to be set for an output pin
     122 */
    51123void gpio_init_inout(gpio_t* gpio, PinName pin, PinDirection direction, PinMode mode, int value);
     124
     125/**@}*/
    52126
    53127#ifdef __cplusplus
     
    56130
    57131#endif
     132
     133/** @}*/
Note: See TracChangeset for help on using the changeset viewer.