/* put a byte (8bits) to a pointer 
Caller should ensure parameters are valid. */
void BytesPut8(void *ptr, uint8_t v)
/* put a byte (8bits) to a pointer 
Caller should ensure parameters are valid. */
void BytesPut8(void *ptr, uint8_t v)
{
    uint8_t *p = (uint8_t *)ptr;
    p[0] = v;
}