forked from speeduino/speeduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Direct coil/injector control initialised by each board.
Direct I/O now all encapsulated
- Loading branch information
1 parent
9c02acf
commit 0d07943
Showing
12 changed files
with
97 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
#include "scheduledIO_direct.h" | ||
|
||
static inline void registerPins(ioPort toRegister[], uint8_t toRegisterSize, const uint8_t pins[]) { | ||
for (uint8_t index=0U; index<toRegisterSize; ++index) { | ||
toRegister[index] = pinToOutputPort(pins[index]); | ||
} | ||
} | ||
|
||
// cppcheck-suppress misra-c2012-8.4 | ||
ioPort injectorPins[INJ_CHANNELS]; | ||
|
||
void initialiseInjectorPins_DIRECT(const uint8_t pins[]) { | ||
registerPins(injectorPins, _countof(injectorPins), pins); | ||
} | ||
|
||
// cppcheck-suppress misra-c2012-8.4 | ||
ioPort ignitionPins[IGN_CHANNELS]; | ||
ioPort ignitionPins[IGN_CHANNELS]; | ||
|
||
void initialiseIgnitionPins_DIRECT(const uint8_t pins[]) { | ||
registerPins(ignitionPins, _countof(ignitionPins), pins); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.