Hi all!
This seems a good idea, and you can even improve the copy doing someting like
this (pseudo-code only):
void* buf_set_buf(const void *_src, unsigned src_start,
void *_dst, unsigned dst_start, unsigned len)
{
/* Are src and dst bit aligned? */
if ((dst_start % 8) != (src_start % 8))
{
/* No -> bit to bit copy */
....
return ;
}
/* Manage non-byte data at the beginning */
while (((dst_start % 8) != 0) && len)
{
/* bit to bit copy */
}
/* we've got 2 byte-aligned buffers ;)*/
memcpy...
/* Manage non-byte data at the end */
while (len)
{
/* bit to bit copy */
}
}
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development