mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
Merge branch 'master' into esp8266
* master: (148 commits)
Update revision log
Cherry picked fix from 87865ac19d
Updated revision log
Added dependencies for AStylej.dll
Updated translations
Update revision log
Temporary fix for pulseIn() regression.
Added README.adoc for the library manager project
Fixed some libraries metadata.
Temporary disabled DefaultTargetTest under certain conditions
Updated translation from transifex
Updated some translation strings
Fixed test
sam: Fixed initialization of UART/USART mode register
update revision log
Fixed NPE when import menu are empty
Fixed NPE when currently selected platform is no more installed.
Optimized FileUtils.recursiveDelete(File) function
Fixed a bunch of simple warnings in java code
Removed unused classes Commander.java and Webserver.java
...
This commit is contained in:
@ -157,16 +157,24 @@ uint32_t Sd2Card::cardSize(void) {
|
||||
}
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
static uint8_t chip_select_asserted = 0;
|
||||
|
||||
void Sd2Card::chipSelectHigh(void) {
|
||||
digitalWrite(chipSelectPin_, HIGH);
|
||||
#ifdef USE_SPI_LIB
|
||||
SPI.endTransaction();
|
||||
if (chip_select_asserted) {
|
||||
chip_select_asserted = 0;
|
||||
SPI.endTransaction();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
//------------------------------------------------------------------------------
|
||||
void Sd2Card::chipSelectLow(void) {
|
||||
#ifdef USE_SPI_LIB
|
||||
SPI.beginTransaction(settings);
|
||||
if (!chip_select_asserted) {
|
||||
chip_select_asserted = 1;
|
||||
SPI.beginTransaction(settings);
|
||||
}
|
||||
#endif
|
||||
digitalWrite(chipSelectPin_, LOW);
|
||||
}
|
||||
|
Reference in New Issue
Block a user