123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266 |
- #ifdef __AVR_XMEGA__
- #define _mkPort(a) V##a
- #else
- #define _mkPort(a) a
- #endif
- #define PIN_INVERTED 0x8000
- #define A0_INV (PIN_INVERTED + A0)
- #define A1_INV (PIN_INVERTED + A1)
- #define A2_INV (PIN_INVERTED + A2)
- #define A3_INV (PIN_INVERTED + A3)
- #define A4_INV (PIN_INVERTED + A4)
- #define A5_INV (PIN_INVERTED + A5)
- #define A6_INV (PIN_INVERTED + A6)
- #define A7_INV (PIN_INVERTED + A7)
- #define B0_INV (PIN_INVERTED + B0)
- #define B1_INV (PIN_INVERTED + B1)
- #define B2_INV (PIN_INVERTED + B2)
- #define B3_INV (PIN_INVERTED + B3)
- #define B4_INV (PIN_INVERTED + B4)
- #define B5_INV (PIN_INVERTED + B5)
- #define B6_INV (PIN_INVERTED + B6)
- #define B7_INV (PIN_INVERTED + B7)
- #define C0_INV (PIN_INVERTED + C0)
- #define C1_INV (PIN_INVERTED + C1)
- #define C2_INV (PIN_INVERTED + C2)
- #define C3_INV (PIN_INVERTED + C3)
- #define C4_INV (PIN_INVERTED + C4)
- #define C5_INV (PIN_INVERTED + C5)
- #define C6_INV (PIN_INVERTED + C6)
- #define C7_INV (PIN_INVERTED + C7)
- #define D0_INV (PIN_INVERTED + D0)
- #define D1_INV (PIN_INVERTED + D1)
- #define D2_INV (PIN_INVERTED + D2)
- #define D3_INV (PIN_INVERTED + D3)
- #define D4_INV (PIN_INVERTED + D4)
- #define D5_INV (PIN_INVERTED + D5)
- #define D6_INV (PIN_INVERTED + D6)
- #define D7_INV (PIN_INVERTED + D7)
- #define E0_INV (PIN_INVERTED + E0)
- #define E1_INV (PIN_INVERTED + E1)
- #define E2_INV (PIN_INVERTED + E2)
- #define E3_INV (PIN_INVERTED + E3)
- #define E4_INV (PIN_INVERTED + E4)
- #define E5_INV (PIN_INVERTED + E5)
- #define E6_INV (PIN_INVERTED + E6)
- #define E7_INV (PIN_INVERTED + E7)
- #define F0_INV (PIN_INVERTED + F0)
- #define F1_INV (PIN_INVERTED + F1)
- #define F2_INV (PIN_INVERTED + F2)
- #define F3_INV (PIN_INVERTED + F3)
- #define F4_INV (PIN_INVERTED + F4)
- #define F5_INV (PIN_INVERTED + F5)
- #define F6_INV (PIN_INVERTED + F6)
- #define F7_INV (PIN_INVERTED + F7)
- #define G0_INV (PIN_INVERTED + G0)
- #define G1_INV (PIN_INVERTED + G1)
- #define G2_INV (PIN_INVERTED + G2)
- #define G3_INV (PIN_INVERTED + G3)
- #define G4_INV (PIN_INVERTED + G4)
- #define G5_INV (PIN_INVERTED + G5)
- #define G6_INV (PIN_INVERTED + G6)
- #define G7_INV (PIN_INVERTED + G7)
- #define H0_INV (PIN_INVERTED + H0)
- #define H1_INV (PIN_INVERTED + H1)
- #define H2_INV (PIN_INVERTED + H2)
- #define H3_INV (PIN_INVERTED + H3)
- #define H4_INV (PIN_INVERTED + H4)
- #define H5_INV (PIN_INVERTED + H5)
- #define H6_INV (PIN_INVERTED + H6)
- #define H7_INV (PIN_INVERTED + H7)
- #define J0_INV (PIN_INVERTED + J0)
- #define J1_INV (PIN_INVERTED + J1)
- #define J2_INV (PIN_INVERTED + J2)
- #define J3_INV (PIN_INVERTED + J3)
- #define J4_INV (PIN_INVERTED + J4)
- #define J5_INV (PIN_INVERTED + J5)
- #define J6_INV (PIN_INVERTED + J6)
- #define J7_INV (PIN_INVERTED + J7)
- #define K0_INV (PIN_INVERTED + K0)
- #define K1_INV (PIN_INVERTED + K1)
- #define K2_INV (PIN_INVERTED + K2)
- #define K3_INV (PIN_INVERTED + K3)
- #define K4_INV (PIN_INVERTED + K4)
- #define K5_INV (PIN_INVERTED + K5)
- #define K6_INV (PIN_INVERTED + K6)
- #define K7_INV (PIN_INVERTED + K7)
- #define L0_INV (PIN_INVERTED + L0)
- #define L1_INV (PIN_INVERTED + L1)
- #define L2_INV (PIN_INVERTED + L2)
- #define L3_INV (PIN_INVERTED + L3)
- #define L4_INV (PIN_INVERTED + L4)
- #define L5_INV (PIN_INVERTED + L5)
- #define L6_INV (PIN_INVERTED + L6)
- #define L7_INV (PIN_INVERTED + L7)
- #if RS485 == B0
- #define RS485_NAME "B0"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN0
- #elif RS485 == B1
- #define RS485_NAME "B1"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN1
- #elif RS485 == B2
- #define RS485_NAME "B2"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN2
- #elif RS485 == B3
- #define RS485_NAME "B3"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN3
- #elif RS485 == B4
- #define RS485_NAME "B4"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN4
- #elif RS485 == B5
- #define RS485_NAME "B5"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN5
- #elif RS485 == B6
- #define RS485_NAME "B6"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN6
- #elif RS485 == B7
- #define RS485_NAME "B7"
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN7
- #elif RS485 == C0
- #define RS485_NAME "C0"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN0
- #elif RS485 == C1
- #define RS485_NAME "C1"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN1
- #elif RS485 == C2
- #define RS485_NAME "C2"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN2
- #elif RS485 == C3
- #define RS485_NAME "C3"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN3
- #elif RS485 == C4
- #define RS485_NAME "C4"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN4
- #elif RS485 == C5
- #define RS485_NAME "C5"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN5
- #elif RS485 == C6
- #define RS485_NAME "C6"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN6
- #elif RS485 == C7
- #define RS485_NAME "C7"
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN7
- #elif RS485 == D0
- #define RS485_NAME "D0"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN0
- #elif RS485 == D1
- #define RS485_NAME "D1"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN1
- #elif RS485 == D2
- #define RS485_NAME "D2"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN2
- #elif RS485 == D3
- #define RS485_NAME "D3"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN3
- #elif RS485 == D4
- #define RS485_NAME "D4"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN4
- #elif RS485 == D5
- #define RS485_NAME "D5"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN5
- #elif RS485 == D6
- #define RS485_NAME "D6"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN6
- #elif RS485 == D7
- #define RS485_NAME "D7"
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN7
- #elif RS485 == E0
- #define RS485_NAME "E0"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN0
- #elif RS485 == E1
- #define RS485_NAME "E1"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN1
- #elif RS485 == E2
- #define RS485_NAME "E2"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN2
- #elif RS485 == E3
- #define RS485_NAME "E3"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN3
- #elif RS485 == E4
- #define RS485_NAME "E4"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN4
- #elif RS485 == E5
- #define RS485_NAME "E5"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN5
- #elif RS485 == E6
- #define RS485_NAME "E6"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN6
- #elif RS485 == E7
- #define RS485_NAME "E7"
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN7
- #elif RS485 == F0
- #define RS485_NAME "F0"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN0
- #elif RS485 == F1
- #define RS485_NAME "F1"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN1
- #elif RS485 == F2
- #define RS485_NAME "F2"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN2
- #elif RS485 == F3
- #define RS485_NAME "F3"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN3
- #elif RS485 == F4
- #define RS485_NAME "F4"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN4
- #elif RS485 == F5
- #define RS485_NAME "F5"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN5
- #elif RS485 == F6
- #define RS485_NAME "F6"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN6
- #elif RS485 == F7
- #define RS485_NAME "F7"
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN7
- #elif RS485 == G0
- #define RS485_NAME "G0"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN0
- #elif RS485 == G1
- #define RS485_NAME "G1"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN1
- #elif RS485 == G2
- #define RS485_NAME "G2"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN2
- #elif RS485 == G3
- #define RS485_NAME "G3"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN3
- #elif RS485 == G4
- #define RS485_NAME "G4"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN4
- #elif RS485 == G5
- #define RS485_NAME "G5"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN5
- #elif RS485 == G6
- #define RS485_NAME "G6"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN6
- #elif RS485 == G7
- #define RS485_NAME "G7"
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN7
- #elif RS485 == H0
- #define RS485_NAME "H0"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN0
- #elif RS485 == H1
- #define RS485_NAME "H1"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN1
- #elif RS485 == H2
- #define RS485_NAME "H2"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN2
- #elif RS485 == H3
- #define RS485_NAME "H3"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN3
- #elif RS485 == H4
- #define RS485_NAME "H4"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN4
- #elif RS485 == H5
- #define RS485_NAME "H5"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN5
- #elif RS485 == H6
- #define RS485_NAME "H6"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN6
- #elif RS485 == H7
- #define RS485_NAME "H7"
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN7
- #elif RS485 == J0
- #define RS485_NAME "J0"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN0
- #elif RS485 == J1
- #define RS485_NAME "J1"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN1
- #elif RS485 == J2
- #define RS485_NAME "J2"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN2
- #elif RS485 == J3
- #define RS485_NAME "J3"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN3
- #elif RS485 == J4
- #define RS485_NAME "J4"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN4
- #elif RS485 == J5
- #define RS485_NAME "J5"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN5
- #elif RS485 == J6
- #define RS485_NAME "J6"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN6
- #elif RS485 == J7
- #define RS485_NAME "J7"
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN7
- #elif RS485 == K0
- #define RS485_NAME "K0"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN0
- #elif RS485 == K1
- #define RS485_NAME "K1"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN1
- #elif RS485 == K2
- #define RS485_NAME "K2"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN2
- #elif RS485 == K3
- #define RS485_NAME "K3"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN3
- #elif RS485 == K4
- #define RS485_NAME "K4"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN4
- #elif RS485 == K5
- #define RS485_NAME "K5"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN5
- #elif RS485 == K6
- #define RS485_NAME "K6"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN6
- #elif RS485 == K7
- #define RS485_NAME "K7"
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN7
- #elif RS485 == L0
- #define RS485_NAME "L0"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN0
- #elif RS485 == L1
- #define RS485_NAME "L1"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN1
- #elif RS485 == L2
- #define RS485_NAME "L2"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN2
- #elif RS485 == L3
- #define RS485_NAME "L3"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN3
- #elif RS485 == L4
- #define RS485_NAME "L4"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN4
- #elif RS485 == L5
- #define RS485_NAME "L5"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN5
- #elif RS485 == L6
- #define RS485_NAME "L6"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN6
- #elif RS485 == L7
- #define RS485_NAME "L7"
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN7
- #elif RS485 == A0
- #define RS485_NAME "A0"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN0
- #elif RS485 == A1
- #define RS485_NAME "A1"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN1
- #elif RS485 == A2
- #define RS485_NAME "A2"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN2
- #elif RS485 == A3
- #define RS485_NAME "A3"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN3
- #elif RS485 == A4
- #define RS485_NAME "A4"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN4
- #elif RS485 == A5
- #define RS485_NAME "A5"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN5
- #elif RS485 == A6
- #define RS485_NAME "A6"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN6
- #elif RS485 == A7
- #define RS485_NAME "A7"
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN7
- #elif RS485 == B0_INV
- #define RS485_NAME "B0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN0
- #elif RS485 == B1_INV
- #define RS485_NAME "B1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN1
- #elif RS485 == B2_INV
- #define RS485_NAME "B2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN2
- #elif RS485 == B3_INV
- #define RS485_NAME "B3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN3
- #elif RS485 == B4_INV
- #define RS485_NAME "B4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN4
- #elif RS485 == B5_INV
- #define RS485_NAME "B5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN5
- #elif RS485 == B6_INV
- #define RS485_NAME "B6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN6
- #elif RS485 == B7_INV
- #define RS485_NAME "B7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRB
- #define RS485_PORT _mkPort(PORTB)
- #define RS485_PIN PINB
- #define RS485_BIT PIN7
- #elif RS485 == C0_INV
- #define RS485_NAME "C0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN0
- #elif RS485 == C1_INV
- #define RS485_NAME "C1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN1
- #elif RS485 == C2_INV
- #define RS485_NAME "C2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN2
- #elif RS485 == C3_INV
- #define RS485_NAME "C3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN3
- #elif RS485 == C4_INV
- #define RS485_NAME "C4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN4
- #elif RS485 == C5_INV
- #define RS485_NAME "C5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN5
- #elif RS485 == C6_INV
- #define RS485_NAME "C6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN6
- #elif RS485 == C7_INV
- #define RS485_NAME "C7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRC
- #define RS485_PORT _mkPort(PORTC)
- #define RS485_PIN PINC
- #define RS485_BIT PIN7
- #elif RS485 == D0_INV
- #define RS485_NAME "D0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN0
- #elif RS485 == D1_INV
- #define RS485_NAME "D1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN1
- #elif RS485 == D2_INV
- #define RS485_NAME "D2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN2
- #elif RS485 == D3_INV
- #define RS485_NAME "D3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN3
- #elif RS485 == D4_INV
- #define RS485_NAME "D4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN4
- #elif RS485 == D5_INV
- #define RS485_NAME "D5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN5
- #elif RS485 == D6_INV
- #define RS485_NAME "D6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN6
- #elif RS485 == D7_INV
- #define RS485_NAME "D7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRD
- #define RS485_PORT _mkPort(PORTD)
- #define RS485_PIN PIND
- #define RS485_BIT PIN7
- #elif RS485 == E0_INV
- #define RS485_NAME "E0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN0
- #elif RS485 == E1_INV
- #define RS485_NAME "E1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN1
- #elif RS485 == E2_INV
- #define RS485_NAME "E2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN2
- #elif RS485 == E3_INV
- #define RS485_NAME "E3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN3
- #elif RS485 == E4_INV
- #define RS485_NAME "E4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN4
- #elif RS485 == E5_INV
- #define RS485_NAME "E5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN5
- #elif RS485 == E6_INV
- #define RS485_NAME "E6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN6
- #elif RS485 == E7_INV
- #define RS485_NAME "E7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRE
- #define RS485_PORT _mkPort(PORTE)
- #define RS485_PIN PINE
- #define RS485_BIT PIN7
- #elif RS485 == F0_INV
- #define RS485_NAME "F0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN0
- #elif RS485 == F1_INV
- #define RS485_NAME "F1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN1
- #elif RS485 == F2_INV
- #define RS485_NAME "F2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN2
- #elif RS485 == F3_INV
- #define RS485_NAME "F3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN3
- #elif RS485 == F4_INV
- #define RS485_NAME "F4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN4
- #elif RS485 == F5_INV
- #define RS485_NAME "F5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN5
- #elif RS485 == F6_INV
- #define RS485_NAME "F6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN6
- #elif RS485 == F7_INV
- #define RS485_NAME "F7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRF
- #define RS485_PORT _mkPort(PORTF)
- #define RS485_PIN PINF
- #define RS485_BIT PIN7
- #elif RS485 == G0_INV
- #define RS485_NAME "G0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN0
- #elif RS485 == G1_INV
- #define RS485_NAME "G1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN1
- #elif RS485 == G2_INV
- #define RS485_NAME "G2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN2
- #elif RS485 == G3_INV
- #define RS485_NAME "G3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN3
- #elif RS485 == G4_INV
- #define RS485_NAME "G4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN4
- #elif RS485 == G5_INV
- #define RS485_NAME "G5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN5
- #elif RS485 == G6_INV
- #define RS485_NAME "G6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN6
- #elif RS485 == G7_INV
- #define RS485_NAME "G7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRG
- #define RS485_PORT _mkPort(PORTG)
- #define RS485_PIN PING
- #define RS485_BIT PIN7
- #elif RS485 == H0_INV
- #define RS485_NAME "H0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN0
- #elif RS485 == H1_INV
- #define RS485_NAME "H1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN1
- #elif RS485 == H2_INV
- #define RS485_NAME "H2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN2
- #elif RS485 == H3_INV
- #define RS485_NAME "H3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN3
- #elif RS485 == H4_INV
- #define RS485_NAME "H4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN4
- #elif RS485 == H5_INV
- #define RS485_NAME "H5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN5
- #elif RS485 == H6_INV
- #define RS485_NAME "H6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN6
- #elif RS485 == H7_INV
- #define RS485_NAME "H7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRH
- #define RS485_PORT _mkPort(PORTH)
- #define RS485_PIN PINH
- #define RS485_BIT PIN7
- #elif RS485 == J0_INV
- #define RS485_NAME "J0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN0
- #elif RS485 == J1_INV
- #define RS485_NAME "J1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN1
- #elif RS485 == J2_INV
- #define RS485_NAME "J2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN2
- #elif RS485 == J3_INV
- #define RS485_NAME "J3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN3
- #elif RS485 == J4_INV
- #define RS485_NAME "J4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN4
- #elif RS485 == J5_INV
- #define RS485_NAME "J5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN5
- #elif RS485 == J6_INV
- #define RS485_NAME "J6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN6
- #elif RS485 == J7_INV
- #define RS485_NAME "J7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRJ
- #define RS485_PORT _mkPort(PORTJ)
- #define RS485_PIN PINJ
- #define RS485_BIT PIN7
- #elif RS485 == K0_INV
- #define RS485_NAME "K0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN0
- #elif RS485 == K1_INV
- #define RS485_NAME "K1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN1
- #elif RS485 == K2_INV
- #define RS485_NAME "K2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN2
- #elif RS485 == K3_INV
- #define RS485_NAME "K3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN3
- #elif RS485 == K4_INV
- #define RS485_NAME "K4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN4
- #elif RS485 == K5_INV
- #define RS485_NAME "K5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN5
- #elif RS485 == K6_INV
- #define RS485_NAME "K6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN6
- #elif RS485 == K7_INV
- #define RS485_NAME "K7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRK
- #define RS485_PORT _mkPort(PORTK)
- #define RS485_PIN PINK
- #define RS485_BIT PIN7
- #elif RS485 == L0_INV
- #define RS485_NAME "L0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN0
- #elif RS485 == L1_INV
- #define RS485_NAME "L1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN1
- #elif RS485 == L2_INV
- #define RS485_NAME "L2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN2
- #elif RS485 == L3_INV
- #define RS485_NAME "L3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN3
- #elif RS485 == L4_INV
- #define RS485_NAME "L4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN4
- #elif RS485 == L5_INV
- #define RS485_NAME "L5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN5
- #elif RS485 == L6_INV
- #define RS485_NAME "L6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN6
- #elif RS485 == L7_INV
- #define RS485_NAME "L7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRL
- #define RS485_PORT _mkPort(PORTL)
- #define RS485_PIN PINL
- #define RS485_BIT PIN7
- #elif RS485 == A0_INV
- #define RS485_NAME "A0_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN0
- #elif RS485 == A1_INV
- #define RS485_NAME "A1_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN1
- #elif RS485 == A2_INV
- #define RS485_NAME "A2_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN2
- #elif RS485 == A3_INV
- #define RS485_NAME "A3_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN3
- #elif RS485 == A4_INV
- #define RS485_NAME "A4_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN4
- #elif RS485 == A5_INV
- #define RS485_NAME "A5_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN5
- #elif RS485 == A6_INV
- #define RS485_NAME "A6_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN6
- #elif RS485 == A7_INV
- #define RS485_NAME "A7_INV"
- #define RS485_INVERT
- #define RS485_DDR DDRA
- #define RS485_PORT _mkPort(PORTA)
- #define RS485_PIN PINA
- #define RS485_BIT PIN7
- #else
- #error -------------------------------------------
- #error Unrecognized RS485 name. Should be like "B5"
- #error or "B5_INV" for active high
- #error -------------------------------------------
- #endif
|