Skip to content

Commit bf2fb00

Browse files
authored
Fix bug in unreserving GPIO pins for SD Card (#2158)
***NO_CI***
1 parent 4736fdc commit bf2fb00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/ESP32/_nanoCLR/System.IO.FileSystem/nf_sys_io_filesystem_nanoFramework_System_IO_FileSystem_SDCard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ void GetMMCPins(bool _1bit, int *count, int8_t **pPins)
5353

5454
void UnReservePins(int count, int8_t *pPins)
5555
{
56-
for (int index = count; index <= count; index++)
56+
for (int index = count - 1; index >= 0; index--)
5757
{
5858
CPU_GPIO_ReservePin((GPIO_PIN)pPins[index], false);
5959
}

0 commit comments

Comments
 (0)