Very rough POC pinmap set

This commit is contained in:
3djc
2019-02-11 10:37:15 +01:00
parent 1baf2e740e
commit b58aaaa19a
13 changed files with 39 additions and 16 deletions
+6
View File
@@ -22,6 +22,7 @@
#define _MODULES_H_
#include "myeeprom.h"
#include "bitfield.h"
#define CROSSFIRE_CHANNELS_COUNT 16
@@ -205,6 +206,11 @@ inline uint8_t getPinOuput(uint8_t receiverIdx, uint8_t moduleIdx, uint8_t pin)
return ((g_model.moduleData[moduleIdx].pxx2.receivers[receiverIdx].channelMapping >> (pin + ((pin & 0x01) ? -1 : 1 )) * 4) & 0x0F);
}
inline void setPinOuput(uint8_t receiverIdx, uint8_t moduleIdx, uint8_t pin, uint8_t chan)
{
BF_SET(g_model.moduleData[moduleIdx].pxx2.receivers[receiverIdx].channelMapping, chan, (pin + ((pin & 0x01) ? -1 : 1 )) * 4, 4);
}
inline int8_t maxModuleChannels_M8(uint8_t idx)
{
if (isExtraModule(idx))