- Codice: Seleziona tutto
struct StrutturaPorte PorteInUso ;
PorteInUso = Port_mapping(PORTBbits.RB7,PORTBbits.RB6,PORTBbits.RB5,PORTBbits.RB4,PORTBbits.RB3,PORTBbits.RB2,PORTBbits.RB1,PORTBbits.RB0,PORTCbits.RC7,PORTCbits.RC6,PORTCbits.RC5);
dove..
- Codice: Seleziona tutto
struct StrutturaPorte
{
unsigned char Porta7;
unsigned char Porta6;
unsigned char Porta5;
unsigned char Porta4;
unsigned char Porta3;
unsigned char Porta2;
unsigned char Porta1;
unsigned char Porta0;
unsigned char PortaEn;
unsigned char PortaRS;
unsigned char PortaRW;
};
struct StrutturaPorte Port_mapping(unsigned char p7,unsigned char p6, unsigned char p5, unsigned char p4, unsigned char p3, unsigned char p2, unsigned char p1, unsigned char p0, unsigned char pEn, unsigned char pRS, unsigned char pRW)
{
struct StrutturaPorte strutturaporte;
strutturaporte.Porta0 = p0;
strutturaporte.Porta1 = p1;
strutturaporte.Porta2 = p2;
strutturaporte.Porta3 = p3;
strutturaporte.Porta4 = p4;
strutturaporte.Porta5 = p5;
strutturaporte.Porta6 = p6;
strutturaporte.Porta7 = p7;
strutturaporte.PortaEn = pEn;
strutturaporte.PortaRS = pRS;
strutturaporte.PortaRW = pRW;
return strutturaporte;
}
Mi dice errore : make: *** [.build-impl] Error 2
C:\Users\Max\Documents\PIC_FIRMWARES\MplabXTest\LCD_ST7066U_TESTING.X\Main.c:20:Error: syntax error
make[2]: Leaving directory `C:/Users/Max/Documents/PIC_FIRMWARES/MplabXTest/LCD_ST7066U_TESTING.X'
make[1]: Leaving directory `C:/Users/Max/Documents/PIC_FIRMWARES/MplabXTest/LCD_ST7066U_TESTING.X'
Non capisco come recuperare il vettore StrutturaPorte dalla funzione.
Sbaglio sintassi o concetto?
Ammetto che di C, non sono super afferrato, ma ho provato a realizzare due vettori uguali, inizializzarne uno, e copiarlo dentro ad un altro. ha funzionato... quindi perché non posso copiare il risultato della funzione dentro al mio vettore che ha lo stesso padre?

Elettrotecnica e non solo (admin)
Un gatto tra gli elettroni (IsidoroKZ)
Esperienza e simulazioni (g.schgor)
Moleskine di un idraulico (RenzoDF)
Il Blog di ElectroYou (webmaster)
Idee microcontrollate (TardoFreak)
PICcoli grandi PICMicro (Paolino)
Il blog elettrico di carloc (carloc)
DirtEYblooog (dirtydeeds)
Di tutto... un po' (jordan20)
AK47 (lillo)
Esperienze elettroniche (marco438)
Telecomunicazioni musicali (clavicordo)
Automazione ed Elettronica (gustavo)
Direttive per la sicurezza (ErnestoCappelletti)
EYnfo dall'Alaska (mir)
Apriamo il quadro! (attilio)
H7-25 (asdf)
Passione Elettrica (massimob)
Elettroni a spasso (guidob)
Bloguerra (guerra)

instead of
(Anonimo).
ain't
, right?
in lieu of
.
for
arithm.
