summaryrefslogtreecommitdiff
path: root/zephyr/shim/src/hwtimer.c
blob: d99f7a826b2b9e6eb122640e602bcc8b35158baa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/* Copyright 2020 The ChromiumOS Authors
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include <zephyr/kernel.h>
#include <stdint.h>

#include "hwtimer.h"

uint64_t __hw_clock_source_read64(void)
{
	return k_ticks_to_us_floor64(k_uptime_ticks());
}

uint32_t __hw_clock_event_get(void)
{
	/*
	 * CrOS EC event deadlines don't quite make sense in Zephyr
	 * terms.  Evaluate what to do about this later...
	 */
	return 0;
}

void udelay(unsigned us)
{
	k_busy_wait(us);
}