MSPI driver

Droopy
Benutzer
Avatar
Gender:
Age: 58
Posts: 24
Registered: 01 / 2016
Subject:

MSPI driver

 · 
Posted: 24.04.2019 - 23:01  ·  #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
Gender:
Age: 24
Posts: 1409
Registered: 03 / 2005
Subject:

Re: MSPI driver

 · 
Posted: 25.04.2019 - 17:45  ·  #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
Gender:
Age: 58
Posts: 24
Registered: 01 / 2016
Subject:

Re: MSPI driver

 · 
Posted: 26.04.2019 - 16:00  ·  #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 ;)
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   65   79 · Page-Gen-Time: 0.027752s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI