Implementation example AN2739
16/26
Low-level functions
Some low-level functions provide flexible management of the memory (SPI Flash/NOR,
etc.). Other types of memories can be supported simply by replacing the body of these low-
level functions by the corresponding functions for the memory.
Example: the Media_Init function should contain the entire memory initialization
procedure. The application can just call to corresponding memory driver function (that is the
NOR_Init() function).
Driver firmware flowcharts
Figure 5 and Figure 6 illustrate the driver functionality.
Figure 5. Driver’s functional flowchart 1
Table 9. I2S_CODEC low-level driver functions
Function name Description
Media_Init Calls the initialization procedure for the used memory medium.
Media_StartReadSequence Enables reading from the memory medium.
Media_ReadByte Reads and returns a byte from the memory medium.
Media_ReadHalfWord Reads and returns a half word from the memory medium.
Media_BufferRead
Reads a buffer of bytes from the memory medium (used to read
the wave file header).