Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
c1662a99
Commit
c1662a99
authored
Feb 08, 2015
by
devsaurus
Browse files
use __XTENSA__
parent
5a67fec4
Changes
1
Show whitespace changes
Inline
Side-by-side
app/u8glib/u8g.h
View file @
c1662a99
...
@@ -50,8 +50,10 @@ typedef unsigned char uint8_t;
...
@@ -50,8 +50,10 @@ typedef unsigned char uint8_t;
typedef
signed
char
int8_t
;
typedef
signed
char
int8_t
;
typedef
unsigned
short
uint16_t
;
typedef
unsigned
short
uint16_t
;
typedef
signed
short
int16_t
;
typedef
signed
short
int16_t
;
#elif defined(__XTENSA__)
# include <c_types.h>
#else
#else
#include <
c_types
.h>
#
include <
stdint
.h>
#endif
#endif
#if defined(__AVR__)
#if defined(__AVR__)
...
@@ -85,15 +87,19 @@ extern "C" {
...
@@ -85,15 +87,19 @@ extern "C" {
# if defined(__AVR__)
# if defined(__AVR__)
# define U8G_FONT_SECTION(name) U8G_SECTION(".progmem." name)
# define U8G_FONT_SECTION(name) U8G_SECTION(".progmem." name)
# endif
# endif
# if defined(__XTENSA__)
# define U8G_FONT_SECTION(name) U8G_SECTION(".u8g_progmem." name)
# endif
#else
#else
# define U8G_NOINLINE
# define U8G_NOINLINE
# define U8G_PURE
# define U8G_PURE
# define U8G_NOCOMMON
# define U8G_NOCOMMON
# define U8G_SECTION(name)
# define U8G_SECTION(name)
# define U8G_FONT_SECTION(name)
#endif
#endif
#ifndef U8G_FONT_SECTION
#ifndef U8G_FONT_SECTION
# define U8G_FONT_SECTION(name)
U8G_SECTION(".u8g_progmem." name)
# define U8G_FONT_SECTION(name)
#endif
#endif
...
@@ -108,15 +114,21 @@ typedef uint8_t u8g_fntpgm_uint8_t;
...
@@ -108,15 +114,21 @@ typedef uint8_t u8g_fntpgm_uint8_t;
#define u8g_pgm_read(adr) pgm_read_byte_near(adr)
#define u8g_pgm_read(adr) pgm_read_byte_near(adr)
#define U8G_PSTR(s) ((u8g_pgm_uint8_t *)PSTR(s))
#define U8G_PSTR(s) ((u8g_pgm_uint8_t *)PSTR(s))
#else
#elif defined(__XTENSA__)
# define U8G_PROGMEM
# define PROGMEM U8G_SECTION(".u8g_progmem.data")
typedef
uint8_t
u8g_pgm_uint8_t
;
typedef
uint8_t
u8g_fntpgm_uint8_t
;
u8g_pgm_uint8_t
u8g_pgm_read
(
const
u8g_pgm_uint8_t
*
adr
);
# define U8G_PSTR(s) ((u8g_pgm_uint8_t *)(s))
#
define U8G_PROGMEM
#
else
#define PROGMEM
U8G_SECTION(".u8g_progmem.data")
#
define
U8G_
PROGMEM
typedef
uint8_t
u8g_pgm_uint8_t
;
# define PROGMEM
typedef
uint8_t
u8g_
fnt
pgm_uint8_t
;
typedef
uint8_t
u8g_pgm_uint8_t
;
//#define u8g_pgm_read(adr) (*(cons
t u8g_pgm_uint8_t
*)(adr))
typedef
uint8_
t
u8g_
fnt
pgm_uint8_t
;
u8g_pgm_uint8_t
u8g_pgm_read
(
const
u8g_pgm_uint8_t
*
adr
)
;
# define
u8g_pgm_read(
adr) (*(
const u8g_pgm_uint8_t *
)(
adr)
)
#define U8G_PSTR(s) ((u8g_pgm_uint8_t *)(s))
#
define U8G_PSTR(s) ((u8g_pgm_uint8_t *)(s))
#endif
#endif
...
@@ -153,7 +165,6 @@ typedef struct _u8g_dev_arg_bbx_t u8g_dev_arg_bbx_t;
...
@@ -153,7 +165,6 @@ typedef struct _u8g_dev_arg_bbx_t u8g_dev_arg_bbx_t;
typedef
struct
_u8g_box_t
u8g_box_t
;
typedef
struct
_u8g_box_t
u8g_box_t
;
typedef
struct
_u8g_dev_arg_irgb_t
u8g_dev_arg_irgb_t
;
typedef
struct
_u8g_dev_arg_irgb_t
u8g_dev_arg_irgb_t
;
typedef
struct
_pg_struct
pg_struct
;
/*===============================================================*/
/*===============================================================*/
/* generic */
/* generic */
...
@@ -798,9 +809,11 @@ defined(__18CXX) || defined(__PIC32MX)
...
@@ -798,9 +809,11 @@ defined(__18CXX) || defined(__PIC32MX)
#endif
#endif
#ifndef U8G_COM_SSD_I2C
#ifndef U8G_COM_SSD_I2C
#if defined(__XTENSA__)
// ESP8266
// ESP8266
#define U8G_COM_SSD_I2C u8g_com_esp8266_ssd_i2c_fn
#define U8G_COM_SSD_I2C u8g_com_esp8266_ssd_i2c_fn
#endif
#endif
#endif
#ifndef U8G_COM_SSD_I2C
#ifndef U8G_COM_SSD_I2C
#define U8G_COM_SSD_I2C u8g_com_null_fn
#define U8G_COM_SSD_I2C u8g_com_null_fn
...
@@ -1312,6 +1325,8 @@ struct pg_point_struct
...
@@ -1312,6 +1325,8 @@ struct pg_point_struct
pg_word_t
y
;
pg_word_t
y
;
};
};
typedef
struct
_pg_struct
pg_struct
;
/* forward declaration */
struct
pg_edge_struct
struct
pg_edge_struct
{
{
pg_word_t
x_direction
;
/* 1, if x2 is greater than x1, -1 otherwise */
pg_word_t
x_direction
;
/* 1, if x2 is greater than x1, -1 otherwise */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment