How to scroll data in LED dot matrix through multiple modules?
This is the function for my problem.

void draw(void)
{
uint32_t map_buffer=0;int8_t i,k;
uint8_t data_reg[4] = {0xaa,0xbb,0xff,0xff};      // random data to write
uint8_t dis_buf[4],no_device,no_col;s=0;l=3;

for (i=0;i&lt;4;i++)
map_buffer |= data_reg[i] &lt;&lt; i*8;                 // loading data into map_buffer

for (col=0;col&lt;32;col++)                          // for 8 matrix columns
{
    map_buffer &gt;&gt;= 1;                            // start shifting the data by 1 pixel
    for (i=0;i&lt;4;i++)
    dis_buf[i] = map_buffer &gt;&gt; i*8;              // loading shifted data into display buffers
    for (i=0;i&lt;4;i++)
    {
        for (row=1;row&lt;9;row++)                 // for 8 matrix rows
        {
            SPI_TX_m(data = (row&lt;&lt;8) | (dis_buf[i]),i);
        }
    }_delay_ms(1000);
}


}