Does not work as expected becuase it does not set the MSB bit correct. I am using metrowerks compiler.
//shifting right 5 characters
char * buffer;
buffer=global_buffer;
for(i=0;i<5;i++) //shift right for 1;
{
buffer[17-i]=(buffer[17-i]>>1)|(buffer[17-i-1]<<7);
}
EDIT input buffer (just before for loop) 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x2F,0xA0,0xC6,0x9D
i got after for loop 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x17,0xD0,0xE3,0xCE