mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-09-20 03:29:00 +08:00
feat(esp8266): Add "putc" and "vprintf" of version "ets_"
This commit is contained in:
@ -9,7 +9,7 @@ uint32_t Wait_SPI_Idle();
|
||||
void uart_div_modify(uint32_t uart_no, uint32_t baud_div);
|
||||
|
||||
void ets_delay_us(uint32_t us);
|
||||
int ets_vprintf(void (*putc)(char), const char* fmt, va_list ap);
|
||||
int ets_io_vprintf(int (*putc)(int), const char* fmt, va_list ap);
|
||||
|
||||
void system_soft_wdt_feed();
|
||||
|
||||
|
@ -28,14 +28,37 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
uint32_t os_random(void);
|
||||
int32_t os_get_random(unsigned char *buf, size_t len);
|
||||
|
||||
/**
|
||||
* @brief put a character to uart or other devices, similar with putc.
|
||||
*
|
||||
* @param c : a character.
|
||||
*
|
||||
* @return int : the character written as an unsigned char cast to an int or EOF on error.
|
||||
*/
|
||||
int ets_putc(int c);
|
||||
|
||||
/**
|
||||
* @brief Printf the strings to uart or other devices, similar with vprintf, simple than vprintf.
|
||||
* Can not print float point data format, or longlong data format.
|
||||
*
|
||||
* @param const char *fmt : See vprintf.
|
||||
*
|
||||
* @param ap : parameter list, see vprintf.
|
||||
*
|
||||
* @return int : the length printed to the output device.
|
||||
*/
|
||||
int ets_vprintf(const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* @brief Printf the strings to uart or other devices, similar with printf, simple than printf.
|
||||
* Can not print float point data format, or longlong data format.
|
||||
|
Reference in New Issue
Block a user