Files
zTC1/mico-os/platform/GCC/stdio_newlib.h

40 lines
1.2 KiB
C

/**
* UNPUBLISHED PROPRIETARY SOURCE CODE
* Copyright (c) 2016 MXCHIP Inc.
*
* The contents of this file may not be disclosed to third parties, copied or
* duplicated in any form, in whole or in part, without the prior written
* permission of MXCHIP Corporation.
*
*/
#pragma once
#include "stdint.h"
#include "platform.h"
#include "platform_config.h"
/** Transmit data on a UART interface
*
* @param uart : the UART interface
* @param data : pointer to the start of data
* @param size : number of bytes to transmit
*
* @return kNoErr : on success.
* @return kGeneralErr : if an error occurred with any step
*/
int MicoUartSend( mico_uart_t uart, const void* data, uint32_t size );
/** Receive data on a UART interface
*
* @param uart : the UART interface
* @param data : pointer to the buffer which will store incoming data
* @param size : number of bytes to receive
* @param timeout : timeout in milisecond
*
* @return kNoErr : on success.
* @return kGeneralErr : if an error occurred with any step
*/
int MicoUartRecv( mico_uart_t uart, void* data, uint32_t size, uint32_t timeout );