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
6d82f8da
Commit
6d82f8da
authored
Dec 17, 2015
by
Johny Mattsson
Browse files
Merge pull request #857 from devsaurus/dev-spi_cpol
SPI: cpol=high is not implemented due to insufficient hw docs
parents
53ee80e3
5e9bf95c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/spi.c
View file @
6d82f8da
...
...
@@ -33,6 +33,10 @@ static int spi_setup( lua_State *L )
if
(
cpol
!=
PLATFORM_SPI_CPOL_LOW
&&
cpol
!=
PLATFORM_SPI_CPOL_HIGH
)
{
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
)
{
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