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/port_api.h

    r321 r429  
     1
     2/** \addtogroup hal */
     3/** @{*/
    14/* mbed Microcontroller Library
    25 * Copyright (c) 2006-2013 ARM Limited
     
    2528#endif
    2629
     30/** Port HAL structure. port_s is declared in the target's HAL
     31 */
    2732typedef struct port_s port_t;
    2833
     34/**
     35 * \defgroup hal_port Port HAL functions
     36 * @{
     37 */
     38
     39/** Get the pin name from the port's pin number
     40 *
     41 * @param port  The port name
     42 * @param pin_n The pin number within the specified port
     43 * @return The pin name for the port's pin number
     44 */
    2945PinName port_pin(PortName port, int pin_n);
    3046
    31 void port_init (port_t *obj, PortName port, int mask, PinDirection dir);
    32 void port_mode (port_t *obj, PinMode mode);
    33 void port_dir  (port_t *obj, PinDirection dir);
     47/** Initilize the port
     48 *
     49 * @param obj  The port object to initialize
     50 * @param port The port name
     51 * @param mask The bitmask to identify which bits in the port should be included (0 - ignore)
     52 * @param dir  The port direction
     53 */
     54void port_init(port_t *obj, PortName port, int mask, PinDirection dir);
     55
     56/** Set the input port mode
     57 *
     58 * @param obj  The port object
     59 * @param mode THe port mode to be set
     60 */
     61void port_mode(port_t *obj, PinMode mode);
     62
     63/** Set port direction (in/out)
     64 *
     65 * @param obj The port object
     66 * @param dir The port direction to be set
     67 */
     68void port_dir(port_t *obj, PinDirection dir);
     69
     70/** Write value to the port
     71 *
     72 * @param obj   The port object
     73 * @param value The value to be set
     74 */
    3475void port_write(port_t *obj, int value);
    35 int  port_read (port_t *obj);
     76
     77/** Read the current value on the port
     78 *
     79 * @param obj The port object
     80 * @return An integer with each bit corresponding to an associated port pin setting
     81 */
     82int port_read(port_t *obj);
     83
     84/**@}*/
    3685
    3786#ifdef __cplusplus
     
    4190
    4291#endif
     92
     93/** @}*/
Note: See TracChangeset for help on using the changeset viewer.