Syntax
uint32_t write(
    uint8_t* _data, 
    uint32_t size
);
ContentsIndex
PreviousUpNext
SPIClass::write Method
SPIClass Class | Example
Syntax
uint32_t write(
    uint8_t* _data, 
    uint32_t size
);
Description

Writes block memory to slave. The memory size needs to be 2^X in exponential form.

Parameters
Parameters 
Description 
uint8_t* _data 
[IN] The point of data sent from master to slave. 
uint32_t size 
[IN] The data size to send. 
Returns

The size to write, or 

0:Failed.

Example
#include <SPI.h>
#define SS_PIN    10

void setup()
{
    pinMode(SS_PIN, OUTPUT);
    SPI.begin(); 
    SPI.setClockDivider(SPI_CLOCK_DIV8); 
}
void loop()
{
    byte ret_val;
    uint8_t mem[64];
    //    //    memset(mem, 0, 64);
    digitalWrite(SS_PIN, LOW);
    SPI.write(mem, 64);
    digitalWrite(SS_PIN, HIGH);
    delay(1000);
}
File

SPI.h

Class