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
5e9bf95c
Commit
5e9bf95c
authored
Dec 16, 2015
by
devsaurus
Browse files
cpol=high is not implemented due to insufficient hw docs
parent
0386ae65
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/spi.c
View file @
5e9bf95c
...
@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L )
...
@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L )
if
(
cpol
!=
PLATFORM_SPI_CPOL_LOW
&&
cpol
!=
PLATFORM_SPI_CPOL_HIGH
)
{
if
(
cpol
!=
PLATFORM_SPI_CPOL_LOW
&&
cpol
!=
PLATFORM_SPI_CPOL_HIGH
)
{
return
luaL_error
(
L
,
"wrong arg type"
);
return
luaL_error
(
L
,
"wrong arg type"
);
}
}
// CPOL_HIGH is not implemented, see app/driver/spi.c spi_master_init()
if
(
cpol
==
PLATFORM_SPI_CPOL_HIGH
)
{
return
luaL_error
(
L
,
"cpol=high is not implemented"
);
}
if
(
cpha
!=
PLATFORM_SPI_CPHA_LOW
&&
cpha
!=
PLATFORM_SPI_CPHA_HIGH
)
{
if
(
cpha
!=
PLATFORM_SPI_CPHA_LOW
&&
cpha
!=
PLATFORM_SPI_CPHA_HIGH
)
{
return
luaL_error
(
L
,
"wrong arg type"
);
return
luaL_error
(
L
,
"wrong arg type"
);
...
...
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