Skip to content

Commit

Permalink
fix mosi/miso
Browse files Browse the repository at this point in the history
trad icm42688p as icm42605
  • Loading branch information
mmosca committed Dec 5, 2024
1 parent 5c54dbe commit 85b4a82
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/utils/bf2inav.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def writeTargetH(folder, map):
use_spi_defined = False
for i in range(1, 9):
sckpin = findPinByFunction("SPI%i_SCK" % (i), map)
misopin = findPinByFunction("SPI%i_SDO" % (i), map)
mosipin = findPinByFunction("SPI%i_SDI" % (i), map)
misopin = findPinByFunction("SPI%i_SDI" % (i), map)
mosipin = findPinByFunction("SPI%i_SDO" % (i), map)
if (sckpin or misopin or mosipin):
if (not use_spi_defined):
use_spi_defined = True
Expand All @@ -343,9 +343,9 @@ def writeTargetH(folder, map):
if sckpin:
file.write("#define SPI%i_SCK_PIN %s\n" % (i, sckpin))
if misopin:
file.write("#define SPI%i_MOSI_PIN %s\n" % (i, misopin))
file.write("#define SPI%i_MISO_PIN %s\n" % (i, misopin))
if mosipin:
file.write("#define SPI%i_MISO_PIN %s\n" % (i, mosipin))
file.write("#define SPI%i_MOSI_PIN %s\n" % (i, mosipin))

use_i2c_defined = False
for i in range(1, 9):
Expand Down

0 comments on commit 85b4a82

Please sign in to comment.