Pinmapping

Support and help for the OpenLRSng project.

Moderator: kha

Post Reply
samys13
Posts: 58
Joined: Mon Feb 29, 2016 5:55 pm
Country: -

Pinmapping

Post by samys13 »

hi everyone, i nned a little help with a pinmapping with openlrsng.
i would like to use M3 flytron 1W TX as RX and woud like to map the same pin as TX ,
i made a modification on code but don't know if i'm right:

here is the original code for RX operation for Flytron M3 1W TX:
#else // RX operation
#define USE_OCR1B // OC1A is used for RFM22, so we use OC1B instead which is buzzer ;)
#define PPM_OUT 10 // OC1B this is the buzzer input
#define RSSI_OUT 3 // PD3 OC2B -this is the PPM pin on the radio connection

#define OUTPUTS 7 // outputs available

const pinMask_t OUTPUT_MASKS[OUTPUTS] = {
{0x04,0x00,0x00},{0x00,0x00,0x08},{0x00,0x01,0x00}, // PPM, RSSI, CH1
{0x00,0x10,0x00},{0x00,0x20,0x00},{0x00,0x00,0x01}, // SDA, SCL, RXD
{0x00,0x00,0x02}, // TXD
};

const uint8_t OUTPUT_PIN[OUTPUTS] = { 10, 3, A0, A4, A5, 0, 1};

#define PPM_OUTPUT 0
#define RSSI_OUTPUT 1
#define LLIND_OUTPUT 2
#define ANALOG0_OUTPUT 3
#define ANALOG1_OUTPUT 4
#define SDA_OUTPUT 3
#define SCL_OUTPUT 4
#define RXD_OUTPUT 5
#define TXD_OUTPUT 6

struct rxSpecialPinMap rxSpecialPins[] = {
{ 0, PINMAP_PPM},
{ 1, PINMAP_LBEEP},
{ 1, PINMAP_RSSI},
{ 2, PINMAP_LLIND},
{ 3, PINMAP_SDA},
{ 3, PINMAP_ANALOG}, // AIN0
{ 4, PINMAP_SCL},
{ 4, PINMAP_ANALOG}, // AIN1
{ 5, PINMAP_RXD},
{ 6, PINMAP_TXD},
{ 6, PINMAP_SPKTRM},
{ 6, PINMAP_SBUS},
{ 6, PINMAP_SUMD},
};

and i change this part: const uint8_t OUTPUT_PIN[OUTPUTS] = { 3, 5, A0, A4, A5, 0, 1};

can someone help me plaese?

Post Reply

Return to “OpenLRSng”