1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-15 00:02:49 +03:00

add prototypes for ets_vsnprintf and ets_vprintf

fix some compiler warnings
This commit is contained in:
Markus Sattler
2015-04-21 18:34:23 +02:00
parent af6c4008df
commit 129175c1bc
3 changed files with 16 additions and 4 deletions

View File

@ -1,14 +1,24 @@
#ifndef __PGMSPACE_H_
#define __PGMSPACE_H_
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdio.h>
#include "ets_sys.h"
#include "osapi.h"
#ifdef __cplusplus
}
#endif
#define PROGMEM
#define PGM_P const char *
#define PSTR(str) (str)
#define vsnprintf_P(...) vsnprintf( __VA_ARGS__ )
#define vsnprintf_P(...) ets_vsnprintf( __VA_ARGS__ )
#define snprintf_P(...) snprintf( __VA_ARGS__ )
#define printf_P(...) os_printf(__VA_ARGS__)
#define _SFR_BYTE(n) (n)

View File

@ -7,6 +7,7 @@
#define _C_TYPES_H_
#include <stdint.h>
#include <stdbool.h>
#include <stdarg.h>
typedef signed char sint8_t;
typedef signed short sint16_t;
@ -75,8 +76,8 @@ typedef enum {
#ifndef __cplusplus
//typedef unsigned char bool;
#define BOOL bool
#define true (1)
#define false (0)
//#define true (1)
//#define false (0)
#define TRUE true
#define FALSE false

View File

@ -118,6 +118,7 @@ void ets_isr_unmask(int intr);
void ets_isr_attach(int intr, int_handler_t handler, void *arg);
void ets_intr_lock();
void ets_intr_unlock();
int ets_vsnprintf(char * s, size_t n, const char * format, va_list arg);
int ets_vprintf(const char * format, va_list arg);
#endif /* _ETS_SYS_H */