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
0c3fc6cc
Commit
0c3fc6cc
authored
Jan 22, 2016
by
devsaurus
Browse files
enable -std=gnu11 for platform dir
parent
3b589e21
Changes
6
Hide whitespace changes
Inline
Side-by-side
app/include/driver/spi.h
View file @
0c3fc6cc
...
...
@@ -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 @
3b589e21
#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/platform/Makefile
View file @
0c3fc6cc
...
...
@@ -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 @
0c3fc6cc
...
...
@@ -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 @
0c3fc6cc
...
...
@@ -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 @
0c3fc6cc
// 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
();
...
...
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