Skip to main content

fixed_point/
lib.rs

1// Copyright 2016 The Fuchsia Authors
2// Copyright (c) 2013, Google Inc. All rights reserved.
3//
4// Use of this source code is governed by a MIT-style
5// license that can be found in the LICENSE file or at
6// https://opensource.org/licenses/MIT
7
8//! Fixed point arithmetic helpers mirroring `<lib/fixed_point.h>`.
9//!
10//! The central type is [`Fp3264`], a 32.64 unsigned fixed point number (32
11//! integer bits and 64 fractional bits) used by platform timer code to convert
12//! between clock domains (e.g. TSC ticks to nanoseconds) without floating
13//! point.
14
15#![no_std]
16
17mod fixed_point;
18mod fixed_point_debug;
19
20pub use fixed_point::{
21    Fp3264, fp_32_64_div_32_32, u32_mul_u64_fp32_64, u64_mul_u32_fp32_64, u64_mul_u64_fp32_64,
22};