Github-Arduino/libraries/Adafruit_TinyFlash/Adafruit_TinyFlash.cpp
boolean Adafruit_TinyFlash::writePage(uint32_t addr, uint8_t *data) {
	if((addr >= CHIP_BYTES) || !waitForReady() || !writeEnable())
		return false;

	cmd(CMD_PAGEPROG);
	(void)spi_xfer(addr >> 16);
	(void)spi_xfer(addr >>  8);
	(void)spi_xfer(0); // If len=256, page boundary only (datasheet 7.2.21)
	for(int i=0; i<256; i++) {
		(void)spi_xfer(data[i]);
	}
	CHIP_DESELECT // Write occurs after the CS line is de-asserted

	delay(3);     // Max page program time according to datasheet

	if(!waitForReady()) return false;

	writeDisable();

	return true;
}
// Writes one page: 256 bytes, starting at 256 byte boundary.  There are
// no other options.  This is the ONLY write method provided by the library;
// other capabilities (if needed) may be implemented in client code.
Writes one page: 256 bytes, starting at 256 byte boundary.  There are
no other options.  This is the ONLY write method provided by the library;
other capabilities (if needed) may be implemented in client code.
Writes one page : 256 bytes starting at 256 byte boundary . There are no other options . This is the ONLY write method provided by the library ; other capabilities ( if needed ) may be implemented in client code .
boolean Adafruit_TinyFlash::writePage(uint32_t addr, uint8_t *data) {
	if((addr >= CHIP_BYTES) || !waitForReady() || !writeEnable())
		return false;
	cmd(CMD_PAGEPROG);
	(void)spi_xfer(addr >> 16);
	(void)spi_xfer(addr >>  8);
	(void)spi_xfer(0); 
	for(int i=0; i<256; i++) {
		(void)spi_xfer(data[i]);
	}
	CHIP_DESELECT 
	delay(3);     
	if(!waitForReady()) return false;
	writeDisable();
	return true;
}
boolean Adafruit_TinyFlash :: writePage ( uint32_t addr , uint8_t * data ) { if ( ( addr >= CHIP_BYTES ) || ! waitForReady ( ) || ! writeEnable ( ) ) return false ; cmd ( CMD_PAGEPROG ) ; ( void ) spi_xfer ( addr >> 16 ) ; ( void ) spi_xfer ( addr >> 8 ) ; ( void ) spi_xfer ( 0 ) ; for ( int i = 0 ; i < 256 ; i ++ ) { ( void ) spi_xfer ( data [ i ] ) ; } CHIP_DESELECT delay ( 3 ) ; if ( ! waitForReady ( ) ) return false ; writeDisable ( ) ; return true ; }
Writes one page: 256 bytes, starting at 256 byte boundary.
Writes one page : 256 bytes starting at 256 byte boundary .
// If len=256, page boundary only (datasheet 7.2.21) // Write occurs after the CS line is de-asserted // Max page program time according to datasheet