SDK3.5
This document shows Ameba SDK 3.5 APIs
serial_ex_api.h File Reference

This file provides mbed API for UART. More...

Ameba Common

enum  SerialFifoLevel { FifoLv1Byte =0, FifoLvQuarter =1, FifoLvHalf =2, FifoLvFull =3 }
 Define RX FIFO Level: RX interrupt trigger, RTS de-assert trigger. More...
 
void serial_clear_tx (serial_t *obj)
 Clear TX fifo. More...
 
void serial_clear_rx (serial_t *obj)
 Clear RX fifo. More...
 
void serial_send_comp_handler (serial_t *obj, void *handler, uint32_t id)
 set TX complete handler. More...
 
void serial_recv_comp_handler (serial_t *obj, void *handler, uint32_t id)
 set RX complete handler. More...
 
int32_t serial_recv_blocked (serial_t *obj, char *prxbuf, uint32_t len, uint32_t timeout_ms)
 recv target length data use poll mode, with time out. More...
 
int32_t serial_send_blocked (serial_t *obj, char *ptxbuf, uint32_t len, uint32_t timeout_ms)
 send target length data use poll mode, with time out. More...
 
int32_t serial_recv_stream (serial_t *obj, char *prxbuf, uint32_t len)
 recv target length data use interrupt mode. More...
 
int32_t serial_send_stream (serial_t *obj, char *ptxbuf, uint32_t len)
 send target length data use interrupt mode. More...
 
int32_t serial_recv_stream_dma (serial_t *obj, char *prxbuf, uint32_t len)
 recv target length data use DMA mode. More...
 
int32_t serial_send_stream_dma (serial_t *obj, char *ptxbuf, uint32_t len)
 send target length data use DMA mode. More...
 
int32_t serial_send_stream_abort (serial_t *obj)
 stop the sream or steam_dma RX. More...
 
int32_t serial_recv_stream_abort (serial_t *obj)
 stop the sream or steam_dma TX. More...
 
void serial_disable (serial_t *obj)
 disable uart clock and function. More...
 
void serial_enable (serial_t *obj)
 enable uart clock and function. More...
 
int32_t serial_recv_stream_timeout (serial_t *obj, char *prxbuf, uint32_t len, uint32_t timeout_ms, void *force_cs)
 recv target length data use interrupt mode. More...
 
int32_t serial_recv_stream_dma_timeout (serial_t *obj, char *prxbuf, uint32_t len, uint32_t timeout_ms, void *force_cs)
 recv target length data use DMA mode. More...
 

Detailed Description

This file provides mbed API for UART.

mbed Microcontroller Library

Author
Version
V1.0.0
Attention

Copyright (c) 2006-2013 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.