]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/commit
spi: Rework the SPI interface personal/sojka/spi-rework
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 28 Aug 2015 21:30:53 +0000 (23:30 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 28 Aug 2015 21:30:53 +0000 (23:30 +0200)
commit7ce3175474253d2a0b887267c9645d5c68a53a21
treeeb4edf369abfe45790b968f47ae8a75810e44197
parentac673c08dbe7667ad75ba5c44db851956b953ba0
spi: Rework the SPI interface

Previous SPI API required the caller to know the SPI interface and index
of the device on this interface. This was because the interface data
structure had links to devices. Now, this is reversed - an SPI device
has a link to SPI interface it is connected to. Therefore, the user of
SPI API needs to specify only the device to communicate with. The SPI
interface is determined from the device internally.

Also some refactoring was done. Things than does not need to be public
were moved from .h to .c and declarations needed in spi.h were moved
there from spi_tms570.h.
17 files changed:
rpp/include/drv/_tms570_rpp/spi_def.h
rpp/include/drv/drv.h
rpp/include/drv/port.h
rpp/include/drv/spi.h
rpp/include/drv/spi_def.h
rpp/include/drv/spi_tms570.h
rpp/src/drv/_tms570_rpp/port_def.c
rpp/src/drv/_tms570_rpp/spi_def.c
rpp/src/drv/hbridge.c
rpp/src/drv/lout.c
rpp/src/drv/spi.c
rpp/src/drv/spi_tms570.c
rpp/src/rpp/dac.c
rpp/src/rpp/din.c
rpp/src/rpp/fr.c
rpp/src/rpp/hbr.c
rpp/src/rpp/lout.c