2.1 SPI-DirectC Code Integration
The following figure shows the SPI-DirectC integration use flow.
To use SPI-DirectC code integration:
- Import the SPI-DirectC files into your development environment as shown in the following figure.
- Modify the SPI-DirectC code.
- Add the SPI driver (available with the processor used to run SPI-DirectC).
- Modify the hardware interface functions (
do_SPI_SCAN_in
anddo_SPI_SCAN_out
) to use the hardware API functions designed to control the SPI port. - Modify memory access functions to access the data blocks within the image file programmed into the system memory. See Data File Bit Orientation for more details.
- Call
dp_top
with the action code desired.
- Compile the source code. This creates a binary executable that is downloaded to the system for execution.