// Returns 64 bit mac timer count value
uint64_t get_timestamp()
{
uint16_t cnt;
cnt = read_counter();
printk ("counter value is 0x%x\n", cnt);
return cnt;
}
within caller:
uint64_t ts;
ts = get_timestamp();
printk ( "returned timestamp is 0x%x \n", ts );
I got the following on screen, What is wrong above?
counter value is 0x000045a5
returned timestamp is 0x00000000
counter value is 0x0000698f
returned timestamp is 0x00000000