SPI.init

Name
SPI.init - Initiate an SPI communication instance. Not totally equivalent to SPI.begin

Description

 * Since Beta X

Syntax
void SPI_init(u8 sync_mode, u8 bus_mode, u8 smp_phase) sync_mode 0 -> SPI Master mode, clock = FOSC/4 1 -> SPI Master mode, clock = FOSC/16 2 -> SPI Master mode, clock = FOSC/64 4 -> SPI Slave mode, clock = SCK pin, SS pin control enabled 5 -> SPI Slave mode, clock = SCK pin, SS pin control disabled bus_mode 0 -> CKP=0, CKE=1 1 -> CKP=0, CKE=0 2 -> CKP=1, CKE=1 3 -> CKP=1, CKE=0 smp_phase Master mode 1 = Input data sampled at end of data output time 0 = Input data sampled at middle of data output time Slave mode : 0 solely