SPI_master_init

Description

This function initialises the I/O pins to be used for the SPI bus and generates an SPI start / stop condition which puts any attached SPI peripherals into a known state (this is kind of like resetting the SPI bus).

The I/O pins used as the SPI bus are defined by the constants SCL, SDA, SCL_port and SDA_port.

SCL_port and SDA_port and defined as PORTA within the library spi_bb_lib.bas

The bits within PORTA bust be defined by the user before spi_bb_lib.bas is included with the user program

e.g.

const	SCL = 3
const	SDA = 4

include "spi_bb_lib.bas"

Definition

SPI_master_init()

Library

LIB/spi_bb_lib.bas

Usage

On entry:
There are no parameters
On exit:
There is no return value