Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
91b2533a
Commit
91b2533a
authored
Jan 24, 2016
by
Johny Mattsson
Browse files
Merge pull request #965 from devsaurus/platform-gnu11
Enable -std=gnu11 for platform and driver dir.
parents
85bd7bbe
9f54c8f5
Changes
9
Hide whitespace changes
Inline
Side-by-side
app/driver/Makefile
View file @
91b2533a
...
...
@@ -15,6 +15,7 @@ ifndef PDIR
GEN_LIBS
=
libdriver.a
endif
STD_CFLAGS
=
-std
=
gnu11
-Wimplicit
#############################################################
# Configuration i.e. compile options etc.
...
...
app/include/driver/spi.h
View file @
91b2533a
...
...
@@ -20,9 +20,9 @@ void spi_lcd_9bit_write(uint8 spi_no,uint8 high_bit,uint8 low_8bit);
//spi master init funtion
void
spi_master_init
(
uint8
spi_no
,
unsigned
cpol
,
unsigned
cpha
,
uint32_t
clock_div
);
// fill MOSI buffer
void
spi_set_mosi
(
uint8
spi_no
,
uint8
offset
,
uint8
bitlen
,
uint32
data
);
void
spi_
mast_
set_mosi
(
uint8
spi_no
,
uint8
offset
,
uint8
bitlen
,
uint32
data
);
// retrieve data from MISO buffer
uint32
spi_get_miso
(
uint8
spi_no
,
uint8
offset
,
uint8
bitlen
);
uint32
spi_
mast_
get_miso
(
uint8
spi_no
,
uint8
offset
,
uint8
bitlen
);
// initiate SPI transaction
void
spi_mast_transaction
(
uint8
spi_no
,
uint8
cmd_bitlen
,
uint16
cmd_data
,
uint8
addr_bitlen
,
uint32
addr_data
,
uint16
mosi_bitlen
,
uint8
dummy_bitlen
,
sint16
miso_bitlen
);
...
...
app/include/driver/spi_master.h
deleted
100644 → 0
View file @
85bd7bbe
#ifndef __SPI_MASTER_H__
#define __SPI_MASTER_H__
#include "driver/spi_register.h"
/*SPI number define*/
#define SPI 0
#define HSPI 1
void
spi_master_init
(
uint8
spi_no
);
void
spi_master_9bit_write
(
uint8
spi_no
,
uint8
high_bit
,
uint8
low_8bit
);
#endif
app/include/rom.h
View file @
91b2533a
...
...
@@ -140,4 +140,7 @@ void Cache_Read_Disable(void);
void
ets_intr_lock
(
void
);
void
ets_intr_unlock
(
void
);
void
ets_install_putc1
(
void
*
routine
);
void
uart_div_modify
(
int
no
,
unsigned
int
freq
);
#endif
app/platform/Makefile
View file @
91b2533a
...
...
@@ -15,6 +15,8 @@ ifndef PDIR
GEN_LIBS
=
libplatform.a
endif
STD_CFLAGS
=
-std
=
gnu11
-Wimplicit
#############################################################
# Configuration i.e. compile options etc.
# Target specific stuff (defines etc.) goes in here!
...
...
app/platform/flash_api.c
View file @
91b2533a
...
...
@@ -376,13 +376,6 @@ bool flash_init_data_blank(void)
return
result
;
}
bool
flash_self_destruct
(
void
)
{
// Dangerous, Erase your flash. Good bye!
SPIEraseChip
();
return
true
;
}
uint8_t
byte_of_aligned_array
(
const
uint8_t
*
aligned_array
,
uint32_t
index
)
{
if
(
(((
uint32_t
)
aligned_array
)
%
4
)
!=
0
)
...
...
app/platform/flash_api.h
View file @
91b2533a
...
...
@@ -103,7 +103,6 @@ uint32_t flash_rom_get_speed(void);
bool
flash_init_data_written
(
void
);
bool
flash_init_data_default
(
void
);
bool
flash_init_data_blank
(
void
);
bool
flash_self_destruct
(
void
);
uint8_t
byte_of_aligned_array
(
const
uint8_t
*
aligned_array
,
uint32_t
index
);
uint16_t
word_of_aligned_array
(
const
uint16_t
*
aligned_array
,
uint32_t
index
);
// uint8_t flash_rom_get_checksum(void);
...
...
app/platform/platform.c
View file @
91b2533a
// Platform-dependent functions
#include "platform.h"
#include "common.h"
#include "c_stdio.h"
#include "c_string.h"
#include "c_stdlib.h"
#include "gpio.h"
#include "user_interface.h"
#include "driver/uart.h"
#include "driver/gpio16.h"
#include "driver/i2c_master.h"
#include "driver/spi.h"
// Platform specific includes
static
void
pwms_init
();
...
...
sdk-overrides/include/osapi.h
View file @
91b2533a
...
...
@@ -4,6 +4,9 @@
#include "rom.h"
void
ets_timer_arm_new
(
ETSTimer
*
a
,
int
b
,
int
c
,
int
isMstimer
);
int
os_printf
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
int
os_printf_plus
(
const
char
*
format
,
...)
__attribute__
((
format
(
printf
,
1
,
2
)));
#include_next "osapi.h"
#endif
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