Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Michal Rybka
openCanSat-2.0-library
Commits
977dd936
Commit
977dd936
authored
Sep 25, 2018
by
Markéta Jedličková
Browse files
UcgLib update
parent
22ddf4a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Ucglib.cpp
View file @
977dd936
...
...
@@ -1199,11 +1199,9 @@ static int16_t ucg_com_arduino_4wire_HW_SPI(ucg_t *ucg, int16_t msg, uint16_t ar
/* setup Arduino SPI */
#if ARDUINO >= 10600
SPI
.
usingInterrupt
(
ucg
->
pin_list
[
UCG_PIN_CS
]);
SPI
.
begin
();
SPI
.
beginTransaction
(
SPISettings
(
1000000000UL
/
((
ucg_com_info_t
*
)
data
)
->
serial_clk_speed
,
MSBFIRST
,
SPI_MODE0
));
#else
SPI
.
begin
();
if
(
((
ucg_com_info_t
*
)
data
)
->
serial_clk_speed
/
2
<
70
)
SPI
.
setClockDivider
(
SPI_CLOCK_DIV2
);
...
...
@@ -1213,17 +1211,12 @@ static int16_t ucg_com_arduino_4wire_HW_SPI(ucg_t *ucg, int16_t msg, uint16_t ar
SPI
.
setClockDivider
(
SPI_CLOCK_DIV8
);
SPI
.
setDataMode
(
SPI_MODE0
);
SPI
.
setBitOrder
(
MSBFIRST
);
#endif
break
;
case
UCG_COM_MSG_POWER_DOWN
:
#if ARDUINO >= 10600
SPI
.
endTransaction
();
SPI
.
end
();
#else
SPI
.
end
();
#endif
break
;
case
UCG_COM_MSG_DELAY
:
delayMicroseconds
(
arg
);
...
...
Write
Preview
Supports
Markdown
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