Function not working probably like expected, using TM4C123 MCU
Just for reference, here's how I would code your function:

// number: data to be send serially
// iteration: number of bits to send
void DATA (unsigned long int number, int iteration)
{
  while (iteration--) {
    TIMER1-&gt;ICR |= (1&lt;&lt;0);       //Reset Timer1 flag
    while (!(TIMER1-&gt;RIS &amp; 0x01)){} //wait until Timer1 times out
    GPIOC-&gt;DATA |= (1&lt;&lt;7);       //Toggle the clock at PC7 high

    if (number &amp; 0x01)           //If bit is 1
      GPIOC-&gt;DATA |= (1&lt;&lt;6);     //Make C6 High 
    else                         //If bit is 0
      GPIOC-&gt;DATA &amp;= ~(1&lt;&lt;6);    //Make C6 Low
    number &gt;&gt;= 1;

    TIMER1-&gt;ICR |= (1&lt;&lt;0);       //Reset Timer1 flag
    while (!(TIMER1-&gt;RIS &amp; 0x01)){} //wait until Timer1 times out
    GPIOC-&gt;DATA &amp;= ~(1&lt;&lt;7);      //Toggle the clock at PC7 low
  }
}


Note that all of your internal variables are completely unnecessary. I've also unrolled the loop to make the polarity of the clock edges explicit.



EDIT: In order to be able to send arbitrary amounts of data, a function that accepts an array of bytes would probably be more useful:

// p: pointer to data to be sent serially
// n: number of bytes to send
void data_str (unsigned char *p, int n)
{
  while (n--) {
    char c = *p++;
    int i;

    for (i=0; i&lt;8; ++i) {
      TIMER1-&gt;ICR |= (1&lt;&lt;0);       //Reset Timer1 flag
      while (!(TIMER1-&gt;RIS &amp; 0x01)){} //wait until Timer1 times out
      GPIOC-&gt;DATA |= (1&lt;&lt;7);       //Toggle the clock at PC7 high

      if (c &amp; 0x01)                //If bit is 1
        GPIOC-&gt;DATA |= (1&lt;&lt;6);     //Make C6 High 
      else                         //If bit is 0
        GPIOC-&gt;DATA &amp;= ~(1&lt;&lt;6);    //Make C6 Low
      c &gt;&gt;= 1;

      TIMER1-&gt;ICR |= (1&lt;&lt;0);       //Reset Timer1 flag
      while (!(TIMER1-&gt;RIS &amp; 0x01)){} //wait until Timer1 times out
      GPIOC-&gt;DATA &amp;= ~(1&lt;&lt;7);      //Toggle the clock at PC7 low
    }
  }
}

// Send 128 bits (16 bytes) of data.
data_str ("\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA", 16);


Now we need two temporary variables: c holds the data so that we don't actually modify the caller's array, and i is used as a counter for the inner loop. Note that the bytes are sent left-to-right, but each byte is sent LSB-first.