Loading files
6ccd314b2This file is pinned to the selected release. Download the original to open it in your design tool.
Files from this revision, including CAD and LFS contents. Git history is not included.
Or in GitHub Desktop, choose File → Clone repository → URL and paste this address.
Public repositories can be cloned without signing in. For pushing, use your ThingAtlas username and a Git access token as the password.
git lfs install git clone https://thingatlas.com/git/-unclaimed/litex-45734719.git
Includes Git history, branches, and Git LFS files. Clones the repository’s default branch, regardless of the version shown here.
6ccd314b2This file is pinned to the selected release. Download the original to open it in your design tool.
// SPDX-License-Identifier: BSD-2-Clause
#ifndef __LIBBASE_TIMEOUT_H
#define __LIBBASE_TIMEOUT_H
#include <stdint.h>
struct timeout {
uint64_t remaining;
uint64_t last;
};
/* Nested deadlines share the uptime counter, or timer0 in free-running mode.
* Without uptime, do not reprogram timer0 (e.g. busy_wait) while a deadline is
* active, and poll at least once per 2^32 system-clock cycles. */
void timeout_start(struct timeout *timeout, unsigned int us);
int timeout_expired(struct timeout *timeout);
#endif