MSPI driver

Droopy
Benutzer
Avatar
Geschlecht:
Alter: 59
Beiträge: 24
Dabei seit: 01 / 2016
Betreff:

MSPI driver

 · 
Gepostet: 24.04.2019 - 23:01 Uhr  ·  #1
Hello all,

I'm using the MSPI driver on a Xmega. My Xmega has 7 ports, C0, C1, D0, .... F0.
Because the hardware is setup with different ports to different boards, I want to switch those ports without writing dedicated firmware. Is this possible? Is there a command?

So just like you have with the serial ports, you have the command 'SerPortSelect':
SerPortSelect:=UsartC1;
SerOut ('xxx');

I want to have it for the MSPI driver, something like:
MSPIPortSelect:=UsartC1;
MSPIoutByte($AA);

Thanx for some helping;)
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1474
Dabei seit: 03 / 2005
Betreff:

Re: MSPI driver

 · 
Gepostet: 25.04.2019 - 17:45 Uhr  ·  #2
Maybe aliases would do the job just as well, something like

Code

alias
  MyUSART = UsartC1;
  MyMSPIOutByte - MSPIOutByteC1


(Not familiar with MSPI driver, so guessing at the MSPIOutByteC1 bit ;-) )
Droopy
Benutzer
Avatar
Geschlecht:
Alter: 59
Beiträge: 24
Dabei seit: 01 / 2016
Betreff:

Re: MSPI driver

 · 
Gepostet: 26.04.2019 - 16:00 Uhr  ·  #3
Thnx ;)

I need to change the ports at runtime so I solved it with just a case structure inside a function.
It will add some extra time but it's not that critical, ...yet ;)
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   65   79 · Page-Gen-Time: 0.025383s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI