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

    r321 r429  
     1
     2/** \addtogroup hal */
     3/** @{*/
    14/* mbed Microcontroller Library
    25 * Copyright (c) 2006-2013 ARM Limited
     
    1821
    1922#include "device.h"
    20 #include "buffer.h"
    21 #include "dma_api.h"
     23#include "hal/buffer.h"
     24#include "hal/dma_api.h"
    2225
    2326#if DEVICE_SERIAL
     
    8184
    8285#if DEVICE_SERIAL_ASYNCH
    83 /** Asynch serial hal structure
     86/** Asynch serial HAL structure
    8487 */
    8588typedef struct {
    8689    struct serial_s serial;  /**< Target specific serial structure */
    87     struct buffer_s tx_buff; /**< Tx buffer */
    88     struct buffer_s rx_buff; /**< Rx buffer */
     90    struct buffer_s tx_buff; /**< TX buffer */
     91    struct buffer_s rx_buff; /**< RX buffer */
    8992    uint8_t char_match;      /**< Character to be matched */
    9093    uint8_t char_found;      /**< State of the matched character */
     
    9295
    9396#else
    94 /** Non-asynch serial hal structure
     97/** Non-asynch serial HAL structure
    9598 */
    9699typedef struct serial_s serial_t;
     
    103106
    104107/**
    105  * \defgroup GeneralSerial Serial Configuration Functions
     108 * \defgroup hal_GeneralSerial Serial Configuration Functions
    106109 * @{
    107110 */
    108111
    109112/** Initialize the serial peripheral. It sets the default parameters for serial
    110  *  peripheral, and configure its specifieds pins.
    111  *
    112  * @param obj The serial object
    113  * @param tx  The TX pin
    114  * @param rx  The RX pin
     113 *  peripheral, and configures its specifieds pins.
     114 *
     115 * @param obj The serial object
     116 * @param tx  The TX pin name
     117 * @param rx  The RX pin name
    115118 */
    116119void serial_init(serial_t *obj, PinName tx, PinName rx);
     
    139142void serial_format(serial_t *obj, int data_bits, SerialParity parity, int stop_bits);
    140143
    141 /** The serial interrupt handler registration.
     144/** The serial interrupt handler registration
    142145 *
    143146 * @param obj     The serial object
    144  * @param handler The interrupt handler which will be invoked when interrupt fires.
     147 * @param handler The interrupt handler which will be invoked when the interrupt fires
    145148 * @param id      The SerialBase object
    146149 */
     
    161164int  serial_getc(serial_t *obj);
    162165
    163 /** Put a character. This is a blocking call, waiting for a peripheral to be available
     166/** Send a character. This is a blocking call, waiting for a peripheral to be available
    164167 *  for writing
    165168 *
     
    172175 *
    173176 * @param obj The serial object
    174  * @return Non-zero value if a character can be read, 0 if nothing to read.
     177 * @return Non-zero value if a character can be read, 0 if nothing to read
    175178 */
    176179int  serial_readable(serial_t *obj);
     
    203206/** Configure the TX pin for UART function.
    204207 *
    205  * @param tx The pin used for TX
     208 * @param tx The pin name used for TX
    206209 */
    207210void serial_pinout_tx(PinName tx);
     
    212215 * @param obj    The serial object
    213216 * @param type   The type of the flow control. Look at the available FlowControl types.
    214  * @param rxflow The tx pin
    215  * @param txflow The rx pin
     217 * @param rxflow The TX pin name
     218 * @param txflow The RX pin name
    216219 */
    217220void serial_set_flow_control(serial_t *obj, FlowControl type, PinName rxflow, PinName txflow);
     
    222225
    223226/**
    224  * \defgroup AsynchSerial Asynchronous Serial Hardware Abstraction Layer
     227 * \defgroup hal_AsynchSerial Asynchronous Serial Hardware Abstraction Layer
    225228 * @{
    226229 */
     
    230233 *
    231234 * @param obj       The serial object
    232  * @param tx        The buffer for sending
    233  * @param tx_length The number of words to transmit
    234  * @param tx_width  The bit width of buffer word
     235 * @param tx        The transmit buffer
     236 * @param tx_length The number of bytes to transmit
     237 * @param tx_width  Deprecated argument
    235238 * @param handler   The serial handler
    236239 * @param event     The logical OR of events to be registered
    237240 * @param hint      A suggestion for how to use DMA with this transfer
    238  * @return Returns number of data transfered, or 0 otherwise
     241 * @return Returns number of data transfered, otherwise returns 0
    239242 */
    240243int serial_tx_asynch(serial_t *obj, const void *tx, size_t tx_length, uint8_t tx_width, uint32_t handler, uint32_t event, DMAUsage hint);
     
    244247 *
    245248 * @param obj        The serial object
    246  * @param rx         The buffer for sending
    247  * @param rx_length  The number of words to transmit
    248  * @param rx_width   The bit width of buffer word
     249 * @param rx         The receive buffer
     250 * @param rx_length  The number of bytes to receive
     251 * @param rx_width   Deprecated argument
    249252 * @param handler    The serial handler
    250253 * @param event      The logical OR of events to be registered
     
    272275 *
    273276 * @param obj The serial object
    274  * @return Returns event flags if a RX transfer termination condition was met or 0 otherwise
     277 * @return Returns event flags if an RX transfer termination condition was met; otherwise returns 0
    275278 */
    276279int serial_irq_handler_asynch(serial_t *obj);
    277280
    278281/** Abort the ongoing TX transaction. It disables the enabled interupt for TX and
    279  *  flush TX hardware buffer if TX FIFO is used
     282 *  flushes the TX hardware buffer if TX FIFO is used
    280283 *
    281284 * @param obj The serial object
     
    283286void serial_tx_abort_asynch(serial_t *obj);
    284287
    285 /** Abort the ongoing RX transaction It disables the enabled interrupt for RX and
    286  *  flush RX hardware buffer if RX FIFO is used
     288/** Abort the ongoing RX transaction. It disables the enabled interrupt for RX and
     289 *  flushes the RX hardware buffer if RX FIFO is used
    287290 *
    288291 * @param obj The serial object
     
    301304
    302305#endif
     306
     307/** @}*/
Note: See TracChangeset for help on using the changeset viewer.