![]() |
Sensorian
1.0
C API Reference Guide Library
|
Functions | |
| void | S25FL_Setup (void) |
| Setup SPI and IOs connected to Serial FLASH. More... | |
| void | S25FL_WriteByte (unsigned char data, unsigned long address) |
| Write a byte to the address specified (24 bit address) More... | |
| unsigned char | S25FL_ReadByte (unsigned long address) |
| Read a byte from the specified 24 bit address. More... | |
| void | S25FL_WriteArray (unsigned long address, unsigned char *pData, unsigned int arrayLength) |
| Write data array at the specified address , this procedure does page programming. The destination address should be provided. This function is not safe so the user has to check the arguments. More... | |
| void | S25FL_ReadArray (unsigned long address, unsigned char *pData, unsigned int arrayLength) |
| Read an array of data from the given address. More... | |
| unsigned int | S25FL_ReadID (void) |
| This function reads the Manufacturer ID code This procedure Reads the manufacturer's ID and device ID. More... | |
| unsigned long | S25FL_Jedec_ID_Read (void) |
| This procedure Reads the manufacturer's ID (BFh), memory type (25h) and device ID (4Bh). It will use 9Fh as the JEDEC ID command. More... | |
| void | S25FL_ChipErase (void) |
| Erase all chip contents. Erase is slow on flash chips. More... | |
| void | S25FL_SectorErase (unsigned long address) |
| This function erases a 4Kb sector (it erase a page actually) More... | |
| void | S25FL_BlockErase (unsigned long address) |
| This function erases a 64Kb block. More... | |
| unsigned char | S25FL_IsWriteBusy (void) |
| This function reads status register and checks BUSY bit for a write in progress operation.It waits until the device is no longer busy. More... | |
| unsigned char | S25FL_SReg_Read (unsigned char statReg) |
| Read specific Status Register depending on value of statReg. More... | |
| void | S25FL_SReg_Write (unsigned char statReg) |
| This procedure writes a byte to the Status Register. More... | |
| void | S25FL_DeepSleep (void) |
| Puts the flash chip into deep sleep mode. More... | |
| void | S25FL_WakeUp (void) |
| Wakes the flash memory chip from deep sleep mode. More... | |
| void | S25FL_SetBlockProtection (unsigned char prot) |
| Sets the block protection of the chip. More... | |
These functions allow you the use the serial flash storage.
| void S25FL_BlockErase | ( | unsigned long | address | ) |
This function erases a 64Kb block.
| address | Block address. |
Definition at line 230 of file S25FL204K.c.
| void S25FL_ChipErase | ( | void | ) |
Erase all chip contents. Erase is slow on flash chips.
Definition at line 195 of file S25FL204K.c.
| void S25FL_DeepSleep | ( | void | ) |
| unsigned char S25FL_IsWriteBusy | ( | void | ) |
This function reads status register and checks BUSY bit for a write in progress operation.It waits until the device is no longer busy.
Definition at line 248 of file S25FL204K.c.
| unsigned long S25FL_Jedec_ID_Read | ( | void | ) |
This procedure Reads the manufacturer's ID (BFh), memory type (25h) and device ID (4Bh). It will use 9Fh as the JEDEC ID command.
Definition at line 177 of file S25FL204K.c.
| void S25FL_ReadArray | ( | unsigned long | address, |
| unsigned char * | pData, | ||
| unsigned int | arrayLength | ||
| ) |
Read an array of data from the given address.
| address | Destination Address 000000H - 7FFFFFH |
| pData | Pointer to array of data |
| arrayLength | Length of pointer to array of data |
Definition at line 129 of file S25FL204K.c.
| unsigned char S25FL_ReadByte | ( | unsigned long | address | ) |
Read a byte from the specified 24 bit address.
| address | Destination Address 000000H - 7FFFFFH |
Definition at line 76 of file S25FL204K.c.
| unsigned int S25FL_ReadID | ( | void | ) |
This function reads the Manufacturer ID code This procedure Reads the manufacturer's ID and device ID.
Definition at line 156 of file S25FL204K.c.
| void S25FL_SectorErase | ( | unsigned long | address | ) |
This function erases a 4Kb sector (it erase a page actually)
| address | Address of the sector. Should start on a even boundary. |
Definition at line 211 of file S25FL204K.c.
| void S25FL_SetBlockProtection | ( | unsigned char | prot | ) |
Sets the block protection of the chip.
| prot | Protection settings. |
Definition at line 318 of file S25FL204K.c.
| void S25FL_Setup | ( | void | ) |
| unsigned char S25FL_SReg_Read | ( | unsigned char | statReg | ) |
Read specific Status Register depending on value of statReg.
| statReg | Address of one of the status registers. |
Definition at line 264 of file S25FL204K.c.
| void S25FL_SReg_Write | ( | unsigned char | statReg | ) |
This procedure writes a byte to the Status Register.
| statReg | Address of one of the status registers. |
Definition at line 279 of file S25FL204K.c.
| void S25FL_WakeUp | ( | void | ) |
Wakes the flash memory chip from deep sleep mode.
Definition at line 306 of file S25FL204K.c.
| void S25FL_WriteArray | ( | unsigned long | address, |
| unsigned char * | pData, | ||
| unsigned int | arrayLength | ||
| ) |
Write data array at the specified address , this procedure does page programming. The destination address should be provided. This function is not safe so the user has to check the arguments.
| address | Destination Address 000000H - 7FFFFFH |
| pData | Pointer to array of data |
| arrayLength | Length of pointer to array of data |
Definition at line 97 of file S25FL204K.c.
| void S25FL_WriteByte | ( | unsigned char | data, |
| unsigned long | address | ||
| ) |
Write a byte to the address specified (24 bit address)
| data | Byte data to be written on a specific address |
| address | 24 bit address of the flash memory |
Definition at line 51 of file S25FL204K.c.